import { Typography } from "@scandic-hotels/design-system/Typography" import { getIntl } from "@/i18n" import { LinkedReservation } from "./LinkedReservation" import Room from "./Room" import styles from "./rooms.module.css" import type { BookingConfirmationRoomsProps } from "@/types/components/hotelReservation/bookingConfirmation/rooms" export default async function Rooms({ booking, checkInTime, checkOutTime, mainRoom, }: BookingConfirmationRoomsProps) { const intl = await getIntl() return (
{booking.linkedReservations.length ? (

{intl.formatMessage( { defaultMessage: "Room {roomIndex}", }, { roomIndex: 1 } )}

) : null}
{booking.linkedReservations.map((reservation, idx) => (

{intl.formatMessage( { defaultMessage: "Room {roomIndex}", }, { roomIndex: idx + 2 } )}

))}
) }