"use client"

import { notFound } from "next/navigation"

import Room from "./Room"

import styles from "./rooms.module.css"

import type { BookingConfirmationRoomsProps } from "@/types/components/hotelReservation/bookingConfirmation/rooms"

export default function Rooms({
  booking,
  room,
}: BookingConfirmationRoomsProps) {
  if (!room) {
    return notFound()
  }
  return (
    <section className={styles.rooms}>
      <Room booking={booking} img={room.images[0]} roomName={room.name} />
    </section>
  )
}
