import type { Metadata } from "next"; import { Inter } from "next/font/google"; import { cookies } from "next/headers"; import "./globals.css"; import { cn } from "@/lib/utils"; import { NextIntlClientProvider } from "next-intl"; import { ThemeProvider } from "@/components/themeProvider"; import { LANGUAGE_CODES } from "@/types/api"; const inter = Inter({ weight: ["400", "500", "600"], subsets: ["latin", "latin-ext", "cyrillic"], variable: "--font-sans" }); export const metadata: Metadata = { title: "Fancy", }; export default async function RootLayout({ children }: LayoutProps<"/">) { const requested = (await cookies()).get("locale")?.value ?? ""; const lang = LANGUAGE_CODES.includes(requested as (typeof LANGUAGE_CODES)[number]) ? requested : "en"; return (