"use client"

import { useRef } from "react"

import Header from "@/components/HotelReservation/BookingConfirmation/Header"

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

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

export default function Confirmation({
  booking,
  hotel,
  children,
}: React.PropsWithChildren<ConfirmationProps>) {
  const mainRef = useRef<HTMLElement | null>(null)

  return (
    <main className={styles.main} ref={mainRef}>
      <Header booking={booking} hotel={hotel} mainRef={mainRef} />
      {children}
    </main>
  )
}
