import { NextIntlClientProvider } from "next-intl"
import { getMessages } from "next-intl/server"

import type { ReactNode } from "react"

export default async function AuthLayout({
  children,
}: {
  children: ReactNode
}) {
  const messages = await getMessages()

  return (
    <div className="fixed inset-0 z-50 flex min-h-screen items-center justify-center bg-background text-foreground p-4">
      <NextIntlClientProvider messages={messages}>
        {children}
      </NextIntlClientProvider>
    </div>
  )
}
