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



export const metadata: Metadata = {
  title: 'Apex Auto Solutions - Expert Car Repair & Maintenance',
  description: 'Your trusted automotive repair shop for comprehensive car care, diagnostics, brakes, oil changes, and more. Schedule your service online today!',
  keywords: ["car repair, auto maintenance, engine diagnostics, brake service, oil change, tire rotation, auto shop, mechanic, vehicle service, car care"],
  openGraph: {
    "title": "Apex Auto Solutions - Expert Car Repair & Maintenance",
    "description": "Your trusted automotive repair shop for comprehensive car care, diagnostics, brakes, oil changes, and more. Schedule your service online today!",
    "url": "https://www.apexauto.com",
    "siteName": "Apex Auto Solutions",
    "images": [
      {
        "url": "http://img.b2bpic.net/free-photo/car-repair-maintenance-theme-mechanic-uniform-working-auto-service_627829-3918.jpg",
        "alt": "Mechanic working on a car"
      }
    ],
    "type": "website"
  },
  twitter: {
    "card": "summary_large_image",
    "title": "Apex Auto Solutions - Expert Car Repair & Maintenance",
    "description": "Your trusted automotive repair shop for comprehensive car care, diagnostics, brakes, oil changes, and more. Schedule your service online today!",
    "images": [
      "http://img.b2bpic.net/free-photo/car-repair-maintenance-theme-mechanic-uniform-working-auto-service_627829-3918.jpg"
    ]
  },
  robots: {
    "index": true,
    "follow": true
  },
};

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

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