import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import { Toaster } from "@/components/ui/toaster";
import { Toaster as SonnerToaster } from "@/components/ui/sonner";
import { ThemeProvider } from "@/components/site/theme-provider";

const geistSans = Geist({
  variable: "--font-geist-sans",
  subsets: ["latin"],
});

const geistMono = Geist_Mono({
  variable: "--font-geist-mono",
  subsets: ["latin"],
});

export const metadata: Metadata = {
  metadataBase: new URL("https://ahe-services.example.com"),
  title: {
    default: "AHE Services - Industrial & Commercial HVAC Solutions",
    template: "%s | AHE Services",
  },
  description:
    "AL-HASAN ENGINEERING SERVICE provides complete HVAC solutions: AC installation, water chiller repair, cold storage, air duct cleaning and AMC contracts in Karachi, Pakistan.",
  keywords: [
    "HVAC services Karachi",
    "industrial AC installation",
    "water chiller repair",
    "cold storage solutions",
    "air duct cleaning",
    "AMC contracts Pakistan",
    "commercial HVAC",
    "AHE Services",
  ],
  authors: [{ name: "AL-HASAN ENGINEERING SERVICE" }],
  creator: "AHE Services",
  openGraph: {
    type: "website",
    locale: "en_US",
    url: "https://ahe-services.example.com",
    siteName: "AHE Services",
    title: "AHE Services - Industrial & Commercial HVAC Solutions",
    description:
      "Complete HVAC solutions for industrial & commercial needs. AC installation, chiller repair, cold storage, duct cleaning and AMC contracts.",
  },
  twitter: {
    card: "summary_large_image",
    title: "AHE Services - HVAC Solutions",
    description: "Complete HVAC solutions for industrial & commercial needs.",
  },
  robots: { index: true, follow: true },
  alternates: { canonical: "/" },
};

export default function RootLayout({
  children,
}: Readonly<{ children: React.ReactNode }>) {
  return (
    <html lang="en" suppressHydrationWarning>
      <body
        className={`${geistSans.variable} ${geistMono.variable} antialiased bg-background text-foreground`}
      >
        <ThemeProvider
          attribute="class"
          defaultTheme="light"
          enableSystem={false}
          disableTransitionOnChange
        >
          {children}
          <Toaster />
          <SonnerToaster position="top-right" richColors closeButton />
        </ThemeProvider>
      </body>
    </html>
  );
}
