import { Suspense } from "react"
import { Loader2 } from "lucide-react"
import { MeetRoomClient } from "@/components/meet/meet-room-client"

export default async function MeetRoomPage({
  params,
}: {
  params: Promise<{ room: string }>
}) {
  const { room } = await params

  return (
    <Suspense
      fallback={
        <div className="flex h-dvh items-center justify-center text-sm text-muted-foreground">
          <Loader2 className="mr-2 size-4 animate-spin" aria-hidden />
          Chargement…
        </div>
      }
    >
      <MeetRoomClient room={decodeURIComponent(room)} />
    </Suspense>
  )
}
