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

export const metadata: Metadata = {
  title: "MultiVehicle Booking - Rent Bikes, Cars, Tractors & More Online",
  description: "Book bikes, cars, tractors, trucks, and JCBs from verified owners. Easy online booking, transparent pricing, and instant confirmation on the MultiVehicle platform.",
  keywords: "vehicle rental, bike rental, car rental, tractor rental, construction equipment rental, online booking",
  openGraph: {
    title: "MultiVehicle Booking - All Vehicles, One Platform",
    description: "Connect with reliable vehicle owners and book any vehicle for your needs.",
    url: "https://multivehicle.com",
    siteName: "MultiVehicle",
    type: "website",
    images: [
      {
        url: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B1TY1lVycNB6OP7jUCAv0IEeap/a-modern-clean-booking-dashboard-interfa-1773655711766-0adda782.png",
        alt: "MultiVehicle Booking Platform",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: "MultiVehicle - Book Vehicles Online",
    description: "Find and book bikes, cars, tractors, and more from trusted owners.",
    images: [
      "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B1TY1lVycNB6OP7jUCAv0IEeap/a-modern-clean-booking-dashboard-interfa-1773655711766-0adda782.png",
    ],
  },
};

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