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

import BookingWidget from "@/components/BookingWidget"

import type { BookingWidgetSearchData } from "@/types/components/bookingWidget"
import type { PageArgs } from "@/types/params"

export default async function BookingWidgetPage({
  searchParams,
}: PageArgs<{}, BookingWidgetSearchData>) {
  if (!env.ENABLE_BOOKING_WIDGET) {
    return null
  }

  return <BookingWidget bookingWidgetSearchParams={searchParams} />
}
