import type { Metadata } from "next";
import { Mulish } from "next/font/google";
import "./globals.css";
import "@/lib/gsap-setup";
import { ServiceWrapper } from "@/components/ServiceWrapper";
import Tag from "@/tag/Tag";
import { getVisualEditScript } from "@/utils/visual-edit-script";

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

export const metadata: Metadata = {
  title: "Family Dental Center Sharjah - Comprehensive Dental Care for All Ages",  description: "Leading dental clinic in Sharjah offering expert general dentistry, implants, root canals, cosmetic, and family care. Book your appointment today for a healthy, beautiful smile.",  keywords: "dental clinic Sharjah, family dentistry, dental implants, root canals, cosmetic dentistry, teeth whitening, pediatric dentist Sharjah, best dentist Sharjah",  metadataBase: new URL("https://www.familydentalcentersharjah.com"),
  alternates: {
    canonical: "https://www.familydentalcentersharjah.com"},
  openGraph: {
    title: "Family Dental Center Sharjah - Expert Dental Care",    description: "Leading dental clinic in Sharjah offering expert general dentistry, implants, root canals, cosmetic, and family care.",    url: "https://www.familydentalcentersharjah.com",    siteName: "Family Dental Center",    images: [
      {
        url: "http://img.b2bpic.net/free-photo/team-happy-doctors-standing-with-arms-crossed-mri-scanner-hospital-looking-camera_637285-389.jpg",        alt: "Dentist examining patient in a modern clinic"},
    ],
    type: "website"},
  twitter: {
    card: "summary_large_image",    title: "Family Dental Center Sharjah - Expert Dental Care",    description: "Leading dental clinic in Sharjah offering expert general dentistry, implants, root canals, cosmetic, and family care.",    images: ["http://img.b2bpic.net/free-photo/team-happy-doctors-standing-with-arms-crossed-mri-scanner-hospital-looking-camera_637285-389.jpg"],
  },
  robots: {
    index: true,
    follow: true,
  },
};

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