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: "Infinity Dental Clinic - Best Dentist in Indore | 4.9★ Rating",
  description: "Visit Infinity Dental Clinic in Vijay Nagar, Indore for expert dental implants, root canal treatment, clear aligners & cosmetic dentistry. Dr. Anmol Billore. 4.9★ from 461+ patients.",
  keywords: "best dentist in Indore, dental clinic Vijay Nagar, dental implants Indore, root canal treatment Indore, clear aligners Indore, cosmetic dentistry Indore, Dr. Anmol Billore",
  metadataBase: new URL("https://infinitydentalindore.com"),
  alternates: {
    canonical: "https://infinitydentalindore.com",
  },
  openGraph: {
    title: "Infinity Dental Clinic - Expert Dental Care in Indore",
    description: "4.9★ Rated dental clinic offering painless implants, RCT, aligners & cosmetic treatments. Book your appointment today.",
    url: "https://infinitydentalindore.com",
    siteName: "Infinity Dental Clinic",
    type: "website",
    images: [
      {
        url: "https://infinitydentalindore.com/og-image.jpg",
        alt: "Infinity Dental Clinic",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: "Infinity Dental Clinic - Indore",
    description: "Expert dental care with 4.9★ rating. Implants, RCT, aligners & more.",
    images: ["https://infinitydentalindore.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>
  );
}