"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 "./breakfast.module.css" import type { PackageSchema } from "@scandic-hotels/trpc/types/bookingConfirmation" interface BreakfastProps { breakfast: PackageSchema | false | undefined breakfastIncluded: boolean guests: string } export default function Breakfast({ breakfast, breakfastIncluded, guests, }: BreakfastProps) { const intl = useIntl() const breakfastBuffet = intl.formatMessage({ defaultMessage: "Breakfast buffet", }) if (breakfastIncluded || breakfast) { const price = breakfast ? formatPrice(intl, breakfast.totalPrice, breakfast.currency) : intl.formatMessage({ defaultMessage: "Included" }) return (
{breakfastBuffet}
{guests}
{price}
{breakfastBuffet}
{noBreakfast}