import HotelLogo from "@/components/Icons/Logos" import Image from "@/components/Image" import Button from "@/components/TempDesignSystem/Button" import Divider from "@/components/TempDesignSystem/Divider" import Link from "@/components/TempDesignSystem/Link" import Body from "@/components/TempDesignSystem/Text/Body" import Caption from "@/components/TempDesignSystem/Text/Caption" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import Title from "@/components/TempDesignSystem/Text/Title" import { getIntl } from "@/i18n" import { getSingleDecimal } from "@/utils/numberFormatting" import { getTypeSpecificInformation } from "./utils" import styles from "./hotelListingItem.module.css" import type { HotelListingItemProps } from "@/types/components/contentPage/hotelListingItem" export default async function HotelListingItem({ hotel, contentType = "hotel", url, }: HotelListingItemProps) { const intl = await getIntl() const { description, imageSrc, altText } = getTypeSpecificInformation( contentType, hotel ) return (
{altText}
{hotel.name}
{hotel.address.streetAddress}
{intl.formatMessage( { id: "Distance in km to city centre" }, { number: getSingleDecimal( hotel.location.distanceToCentre / 1000 ), } )}
{description} {url && ( )}
) }