import type { Metadata } from "next";
import localFont from "next/font/local";
import "./globals.css";
import { LocaleProvider } from "@/i18n/LocaleProvider";
import { SessionProvider } from "@/session/SessionProvider";
import { AppShell } from "@/components/AppShell";

const latin = localFont({
  src: "./fonts/Montserrat.ttf",
  variable: "--font-latin",
  weight: "100 900",
});
const arabic = localFont({
  src: [
    { path: "./fonts/Tajawal-Regular.ttf", weight: "400" },
    { path: "./fonts/Tajawal-Medium.ttf", weight: "500" },
    { path: "./fonts/Tajawal-Bold.ttf", weight: "700" },
  ],
  variable: "--font-arabic",
});

export const metadata: Metadata = {
  title: {
    default: "BeebBeeb Investors",
    template: "%s | BeebBeeb Investors",
  },
  description: "BeebBeeb investor dashboard: track your fleet share, daily and monthly earnings, and withdrawals.",
  applicationName: "BeebBeeb Investors",
  // Private, per-investor financial data: keep it out of search engines.
  robots: { index: false, follow: false, nocache: true },
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en" dir="ltr">
      <body className={`${latin.variable} ${arabic.variable} antialiased`}>
        <LocaleProvider>
          <SessionProvider>
            <AppShell>{children}</AppShell>
          </SessionProvider>
        </LocaleProvider>
      </body>
    </html>
  );
}
