import { BookingConfirmationPage as BookingConfirmationPagePrimitive } from "@scandic-hotels/booking-flow/pages/BookingConfirmationPage"

import { bookingFlowConfig } from "@/constants/bookingFlowConfig"

import { getIntl } from "@/i18n"
import { getLang } from "@/i18n/serverContext"

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

export default async function BookingConfirmationPage(
  props: PageArgs<LangParams>
) {
  const searchParams = await props.searchParams
  const lang = await getLang()
  const intl = await getIntl()

  return (
    <BookingConfirmationPagePrimitive
      intl={intl}
      lang={lang}
      searchParams={searchParams}
      config={bookingFlowConfig}
    />
  )
}
