import type { Metadata } from "next";
import { Halant } from "next/font/google";
import { Inter } from "next/font/google";
import { Open_Sans } 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 openSans = Open_Sans({
  variable: "--font-open-sans",
  subsets: ["latin"],
});

export const metadata: Metadata = {
  title: "The Dera Cafe & Restaurant - Premium Dining in Karachi",
  description: "Experience luxury dining at The Dera - Karachi's premium cafe with sheesha lounge, private dining, and late-night cuisine. 4.3★ rated restaurant.",
  keywords: "restaurant Karachi, premium cafe, sheesha lounge, fine dining, late night food, table reservation, online ordering",
  metadataBase: new URL("https://thederapakistan.com"),
  alternates: {
    canonical: "https://thederapakistan.com",
  },
  openGraph: {
    title: "The Dera Cafe & Restaurant - Premium Dining Experience",
    description: "Discover luxury dining at The Dera. Premium food, relaxing ambiance, late-night service until 3 AM. Reserve your table or order online today.",
    url: "https://thederapakistan.com",
    siteName: "The Dera Cafe & Restaurant",
    type: "website",
    images: [
      {
        url: "https://thederapakistan.com/og-image.jpg",
        alt: "The Dera Cafe & Restaurant - Premium Dining",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: "The Dera Cafe & Restaurant",
    description: "Premium dining experience in Karachi. Open until 3 AM with sheesha lounge, private dining, and exceptional cuisine.",
    images: ["https://thederapakistan.com/twitter-image.jpg"],
  },
  robots: {
    index: true,
    follow: true,
  },
};

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