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: 'Rapid Rescue Towing Johannesburg | 24/7 Roadside Assistance',
  description: 'Fast, reliable 24/7 towing and roadside assistance in Johannesburg. Emergency towing, accident recovery, battery jump starts, flat tyre assistance, fuel delivery, and vehicle lockout services.',
  keywords: ["Towing Johannesburg, Emergency Towing Johannesburg, 24 Hour Towing Johannesburg, Roadside Assistance Johannesburg, Tow Truck Near Me, Vehicle Recovery Johannesburg, Accident Towing Johannesburg"],
  openGraph: {
    "title": "Rapid Rescue Towing Johannesburg | 24/7 Roadside Assistance",
    "description": "Fast, reliable 24/7 towing and roadside assistance in Johannesburg. Emergency towing, accident recovery, battery jump starts, flat tyre assistance, fuel delivery, and vehicle lockout services.",
    "url": "https://www.rapidrescuetowing.co.za",
    "siteName": "Rapid Rescue Towing",
    "images": [
      {
        "url": "http://img.b2bpic.net/free-photo/man-sitting-car-night_23-2149001296.jpg",
        "alt": "Tow truck at night in Johannesburg"
      }
    ],
    "type": "website"
  },
  twitter: {
    "card": "summary_large_image",
    "title": "Rapid Rescue Towing Johannesburg | 24/7 Roadside Assistance",
    "description": "Fast, reliable 24/7 towing and roadside assistance in Johannesburg. Emergency towing, accident recovery, battery jump starts, flat tyre assistance, fuel delivery, and vehicle lockout services.",
    "images": [
      "http://img.b2bpic.net/free-photo/man-sitting-car-night_23-2149001296.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>
  );
}
