import { serverClient } from "@/lib/trpc/server"

import BookingWidget from "@/components/BookingWidget"
import { getLang } from "@/i18n/serverContext"

export default async function BookingWidgetPage() {
  // Get the booking widget show/hide status based on page specific settings
  const bookingWidgetToggle =
    await serverClient().contentstack.bookingwidget.getToggle()

  return (
    <>
      {bookingWidgetToggle && bookingWidgetToggle.hideBookingWidget ? null : (
        <BookingWidget />
      )}
    </>
  )
}
