import { Providers } from "./providers";
import "../styles/index.css";
import Footer from "@/components/Footer";
import Header from "@/components/Header";
import ScrollToTop from "@/components/ScrollToTop";
import { Inter } from "next/font/google";
import TopHeader from "@/components/TopHeader";
import Whatsapp from "@/components/Whatsapp/page";
import { Metadata } from "next";

const inter = Inter({ subsets: ["latin"] });

export const metadata: Metadata = {
  title: {
    default: "Real Switchgears & Cables Pvt. Ltd. | Electrical Distributor India",
    template: "%s | Real Switchgears"
  },
  description: "Real Switchgears & Cables Pvt. Ltd. is India's leading authorized distributor of Polycab wires, cables, and stockist of L&T switchgears, industrial relays, and automation products since 2000.",
  keywords: [
    "Real Switchgears",
    "Polycab wires distributor",
    "L&T switchgears dealer",
    "Industrial automation systems",
    "Cables and wires supplier India",
    "Electrical goods stockist"
  ],
  authors: [{ name: "Real Switchgears & Cables Pvt. Ltd." }],
  creator: "Real Switchgears",
  publisher: "Real Switchgears",
  formatDetection: {
    email: false,
    address: false,
    telephone: false,
  },
  openGraph: {
    title: "Real Switchgears & Cables Pvt. Ltd. | Electrical Solutions",
    description: "Authorized distributor of Polycab & L&T Switchgears. Delivering premium industrial electrical goods across India.",
    url: "https://realswitchgears.com",
    siteName: "Real Switchgears",
    locale: "en_US",
    type: "website",
  },
};

export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html suppressHydrationWarning lang="en">
      <head />

      <body className={`bg-[#FCFCFC] dark:bg-black ${inter.className}`}>
        <Providers>
          <div className="flex min-h-screen flex-col">
            <TopHeader />
            <Header />
            <main className="grow">
              {children}
            </main>
            <Footer />
          </div>
          <ScrollToTop />
          <Whatsapp />
        </Providers>
      </body>
    </html>
  );
}