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 Tag from "@/tag/Tag";
import { getVisualEditScript } from "@/utils/visual-edit-script";



export const metadata: Metadata = {
  title: 'Auto Dealer | Your Next Car with 3D Experience',
  description: 'Explore a wide selection of new and used cars with stunning 3D visualizations and interactive features. Find your dream car at Auto Dealer and schedule a test drive today.',
  keywords: ["car dealership, 3D car models, Honda, Toyota, new cars, used cars, test drive, car configurator"],
  openGraph: {
    "title": "Auto Dealer | Your Next Car with 3D Experience",
    "description": "Explore a wide selection of new and used cars with stunning 3D visualizations and interactive features. Find your dream car at Auto Dealer and schedule a test drive today.",
    "url": "https://www.autodealer.com",
    "siteName": "Auto Dealer",
    "images": [
      {
        "url": "http://img.b2bpic.net/free-photo/happy-customers-car-dealership_23-2149106169.jpg",
        "alt": "Interactive 3D car model"
      }
    ],
    "type": "website"
  },
  twitter: {
    "card": "summary_large_image",
    "title": "Auto Dealer | Your Next Car with 3D Experience",
    "description": "Explore a wide selection of new and used cars with stunning 3D visualizations and interactive features. Find your dream car at Auto Dealer and schedule a test drive today.",
    "images": [
      "http://img.b2bpic.net/free-photo/happy-customers-car-dealership_23-2149106169.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`}>
          <Tag />
          {children}
          <script
              dangerouslySetInnerHTML={{
                  __html: `${getVisualEditScript()}`
              }}
          />
        </body>
      </ServiceWrapper>
    </html>
  );
}
