import { getBookingConfirmation } from "@/lib/trpc/memoizedRequests"

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

import type { LangParams, PageArgs } from "@/types/params"

export default async function BookingConfirmationPage({
  searchParams,
}: PageArgs<LangParams, { confirmationNumber: string }>) {
  void getBookingConfirmation(searchParams.confirmationNumber)
  return (
    <BookingConfirmation confirmationNumber={searchParams.confirmationNumber} />
  )
}
