import HotelLogoIcon from "@scandic-hotels/design-system/Icons/HotelLogoIcon" 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, additionalData, contentType = "hotel", url, }: HotelListingItemProps) { const intl = await getIntl() const { description, image, cta } = getTypeSpecificInformation( intl, contentType, hotel.hotelContent, additionalData, url ) return (
{image.alt}
{hotel.name}
{hotel.address.streetAddress}
{intl.formatMessage( { id: "{number} km to city center" }, { number: getSingleDecimal( hotel.location.distanceToCentre / 1000 ), } )}
{description} {cta.url && ( )}
) }