import type { Metadata } from "next";
import { Inter, Montserrat } from "next/font/google";
import "@/public/styles/main.scss";
import { CookieConsentProvider } from "@/components/shared/layout/CookieConsentContext";
import { CookieConsent } from "@/components/shared/layout/CookieConsent";

const montserrat = Montserrat({
  subsets: ["latin"],
  display: "swap",
  weight: ["100", "200", "300", "400", "500", "600", "700", "800", "900"],
  variable: "--mont",
  fallback: [
    "-apple-system",
    "Segoe UI",
    "Roboto",
    "Ubuntu",
    "Fira Sans",
    "Arial",
    "sans-serif",
  ],
});

const inter = Inter({
  subsets: ["latin"],
  display: "swap",
  weight: ["100", "200", "300", "400", "500", "600", "700", "800", "900"],
  variable: "--inter",
  fallback: [
    "-apple-system",
    "Segoe UI",
    "Roboto",
    "Ubuntu",
    "Fira Sans",
    "Arial",
    "sans-serif",
  ],
});

export const metadata: Metadata = {
  title: "EnterpriseSoft Solutions | Enterprise Software Development & IT Solutions",
  description: "Leading enterprise software development company providing custom solutions, system integrations, and digital transformation services for Fortune 500 companies",
  keywords: [
    "Enterprise Software",
    "Custom Development",
    "System Integration",
    "Digital Transformation",
    "Enterprise Solutions",
    "Software Consulting",
    "API Development",
    "Cloud Migration",
  ],
  authors: [
    {
      name: "EnterpriseSoft Solutions",
      url: "https://enterprisesoft.com",
    },
  ],
};

export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="en">
      <body className={`${inter.variable} ${montserrat.variable}`}>
        <CookieConsentProvider
          config={{
            companyName: "EnterpriseSoft Solutions",
            privacyPolicyUrl: "/privacy-policy",
            cookiePolicyUrl: "/cookie-policy",
            dataControllerEmail: "privacy@enterprisesoft.com",
            retentionPeriod: 365,
            enableAuditLog: true,
            enableDetailedSettings: true,
            showPrivacyNotice: true,
          }}
        >
          {children}
          <CookieConsent />
        </CookieConsentProvider>
      </body>
    </html>
  );
}
