import HotelLogoIcon from "@scandic-hotels/design-system/Icons/HotelLogoIcon" import { Typography } from "@scandic-hotels/design-system/Typography" import ButtonLink from "@/components/ButtonLink" import Image from "@/components/Image" import Divider from "@/components/TempDesignSystem/Divider" 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( { defaultMessage: "{number} km to city center", }, { number: getSingleDecimal( hotel.location.distanceToCentre / 1000 ), } )}

{description}

{cta.url ? ( <> {cta.text} ) : null}
) }