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

export const metadata: Metadata = {
  title: "Jennifer A. Sylvia, D.M.D. | Gentle Dental Care in West Harrison",
  description: "Experience compassionate dental care from Dr. Jennifer A. Sylvia in West Harrison, NY. Trusted by families for general dentistry, teeth whitening, and preventive care. 4.3★ rated. Book your appointment today.",
  keywords: "dentist West Harrison NY, dental care, Dr. Jennifer Sylvia, gentle dentistry, family dentist, teeth cleaning, cosmetic dentistry, preventive care",
  openGraph: {
    title: "Jennifer A. Sylvia, D.M.D. - Your Trusted Dentist in West Harrison",
    description: "Compassionate dental care for the whole family. Experience gentle, professional dentistry in a welcoming environment.",
    url: "https://jenniferasyldiad.dental",
    siteName: "Jennifer A. Sylvia, D.M.D.",
    images: [
      {
        url: "http://img.b2bpic.net/free-photo/female-dentist-treats-patients-teeth-stomatologist-working-with-professional-equipment_169016-67020.jpg",
        alt: "Modern dental office"
      }
    ],
    type: "website"
  },
  twitter: {
    card: "summary_large_image",
    title: "Jennifer A. Sylvia, D.M.D. - Gentle Dental Care",
    description: "Your trusted dentist in West Harrison. Compassionate, professional dental care for the entire family.",
    images: ["http://img.b2bpic.net/free-photo/female-dentist-treats-patients-teeth-stomatologist-working-with-professional-equipment_169016-67020.jpg"]
  }
};

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