import { env } from "@/env/server"

import BookingWidget, { preload } from "@/components/BookingWidget"

import { PageArgs } from "@/types/params"

export default async function BookingWidgetHotelReservationPage({
  searchParams,
}: PageArgs<{}, URLSearchParams>) {
  if (!env.SHOW_BOOKINGWIDGET_HOTELRESERVATION_PATH) {
    return null
  }

  preload()

  return <BookingWidget searchParams={searchParams} />
}

// TODO: This should just:
// export { default } from "../page"
// when current web is no more
