"use client" import { useIntl } from "react-intl" import { formatPrice } from "@scandic-hotels/common/utils/numberFormatting" import { Typography } from "@scandic-hotels/design-system/Typography" import styles from "./summaryBreakfast.module.css" interface BreakfastProps { breakfastPrice: number | false | undefined breakfastCurrency?: string | null breakfastIncluded: boolean guests: string hotelOffersBreakfast: boolean } export function SummaryBreakfast({ breakfastPrice, breakfastCurrency, breakfastIncluded, guests, hotelOffersBreakfast = true, }: BreakfastProps) { const intl = useIntl() const breakfastBuffet = intl.formatMessage({ id: "common.breakfastBuffet", defaultMessage: "Breakfast buffet", }) if (breakfastIncluded || (breakfastPrice && breakfastCurrency)) { const price = breakfastPrice && breakfastCurrency ? formatPrice(intl, breakfastPrice, breakfastCurrency) : intl.formatMessage({ id: "common.included", defaultMessage: "Included", }) return (
{breakfastBuffet}
{guests}
{price}
{breakfastBuffet}
: null}{noBreakfast}