import { Suspense } from "react"

import { MyStay } from "@/components/HotelReservation/MyStay/MyStay"
import { MyStaySkeleton } from "@/components/HotelReservation/MyStay/MyStay/myStaySkeleton"
import { setLang } from "@/i18n/serverContext"

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

export default async function MyStayPage({
  params,
}: PageArgs<LangParams & { refId: string }>) {
  setLang(params.lang)

  return (
    <Suspense fallback={<MyStaySkeleton />}>
      <MyStay reservationId={params.refId} />
    </Suspense>
  )
}
