import type { Metadata } from "next";
import { Outfit } from "next/font/google";
import "./globals.css";

const outfit = Outfit({
  subsets: ["latin"],
  variable: "--font-outfit",
  weight: ["300", "400", "500", "600", "700", "800", "900"],
});

import { getStoreName } from "@/lib/settings";

export async function generateMetadata(): Promise<Metadata> {
  const storeName = await getStoreName();
  return {
    title: `${storeName} | Modern Apparel`,
    description: `High-end contemporary fashion tailored for modern individuals. Shop the latest collections of premium apparel at ${storeName}.`,
  };
}

import { CurrencyProvider } from "@/providers/CurrencyProvider";
import { SettingsProvider } from "@/providers/SettingsProvider";

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en" className={`${outfit.variable} h-full antialiased`}>
      <body className={`min-h-full flex flex-col font-sans`}>
        <SettingsProvider>
          <CurrencyProvider>
            {children}
          </CurrencyProvider>
        </SettingsProvider>
      </body>
    </html>
  );
}
