import type { Metadata } from "next";
import { Halant } from "next/font/google";
import { Inter } from "next/font/google";
import { Nunito } from "next/font/google";
import "./globals.css";
import { ServiceWrapper } from "@/components/ServiceWrapper";
import Tag from "@/tag/Tag";
import { getVisualEditScript } from "@/utils/visual-edit-script";

const halant = Halant({
  variable: "--font-halant",
  subsets: ["latin"],
  weight: ["300", "400", "500", "600", "700"],
});

const inter = Inter({
  variable: "--font-inter",
  subsets: ["latin"],
});

const nunito = Nunito({
  variable: "--font-nunito",
  subsets: ["latin"],
});

export const metadata: Metadata = {
  title: "CHICKEN BOX | Best Fried Chicken in El Tor, South Sinai",
  description: "CHICKEN BOX تشكن بوكس - Delicious fried chicken, burgers, and more. Open 24/7 in El Tor, South Sinai. Dine-in, Drive-through, and Delivery available. Order online now!",
  keywords: "fried chicken, fast food, chicken box, El Tor, South Sinai, Egyptian restaurant, burgers, delivery, online ordering",
  robots: {
    index: true,
    follow: true,
  },
  openGraph: {
    title: "CHICKEN BOX | Best Fried Chicken in El Tor",
    description: "Order delicious fried chicken, burgers, and sandwiches online. Available 24/7 for delivery, dine-in, and drive-through.",
    type: "website",
    url: "https://chickenbox-eltor.com",
    siteName: "CHICKEN BOX",
    images: [
      {
        url: "http://img.b2bpic.net/free-photo/fried-chicken-with-fried-potatoes-celebration_140725-113379.jpg",
        alt: "CHICKEN BOX - Crispy Fried Chicken",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: "CHICKEN BOX | Best Fried Chicken in El Tor",
    description: "Open 24/7. Order now for delivery, dine-in, or drive-through!",
    images: [
      "http://img.b2bpic.net/free-photo/fried-chicken-with-fried-potatoes-celebration_140725-113379.jpg",
    ],
  },
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en" suppressHydrationWarning>
      <ServiceWrapper>
        <body
          className={`${halant.variable} ${inter.variable} ${nunito.variable} antialiased`}
        >
          <Tag />
          {children}
          <script
              dangerouslySetInnerHTML={{
                  __html: `${getVisualEditScript()}`
          }}
        />
        </body>
      </ServiceWrapper>
    </html>
  );
}