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: "Fresh Fruits & Vegetables in Mumbai | Byculla Market",
  description: "Quality fruits and vegetables at Byculla Fruit Market. Call for orders, bulk prices, and fresh daily produce. ⭐ 4.1★ rating from 1,781 customers.",
  keywords: "fruit market Mumbai, vegetable market Byculla, fresh fruits wholesale, bulk fruits Mumbai, local market",
  metadataBase: new URL("https://byculla-fruit-market.com"),
  alternates: {
    canonical: "https://byculla-fruit-market.com",
  },
  robots: {
    index: true,
    follow: true,
  },
  openGraph: {
    title: "Fresh Fruits & Vegetables | Byculla Fruit Market",
    description: "Quality produce available daily. Call +91-98765-43210 or WhatsApp for bulk orders.",
    url: "https://byculla-fruit-market.com",
    siteName: "Byculla Fruit Market",
    type: "website",
    images: [
      {
        url: "http://img.b2bpic.net/free-photo/overhead-view-fresh-raw-vegetables-wooden-desk_23-2147882045.jpg",
        alt: "fresh fruits vegetables market display",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: "Fresh Fruits & Vegetables | Byculla Market",
    description: "Quality produce. Call +91-98765-43210 or WhatsApp for orders.",
    images: [
      "http://img.b2bpic.net/free-photo/overhead-view-fresh-raw-vegetables-wooden-desk_23-2147882045.jpg",
    ],
  },
};

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>
  );
}