import './globals.css';
import type { Metadata } from 'next';
import { PortalI18nProvider } from '@/lib/i18n/provider';
import { getServerPortalLocale } from '@/lib/i18n/server';

export const metadata: Metadata = {
  title: 'Boardware Agent Sandbox',
  description: 'Boardware Agent Sandbox sign-in',
  icons: {
    icon: '/boardware-logo.jpg',
  },
};

export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  const locale = getServerPortalLocale();

  return (
    <html lang={locale}>
      <body>
        <PortalI18nProvider initialLocale={locale}>{children}</PortalI18nProvider>
      </body>
    </html>
  );
}
