import type { Metadata } from "next";
import { Halant } from "next/font/google";
import { Inter } from "next/font/google";
import { Libre_Baskerville } 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 libreBaskerville = Libre_Baskerville({
  variable: "--font-libre-baskerville",
  subsets: ["latin"],
  weight: ["400", "700"],
});

export const metadata: Metadata = {
  title: "Infinix Immigration Services - Honest Visa & PR Consultation Delhi",
  description: "Transparent immigration guidance for Germany, Canada & Australia visas. No false promises. Real process. Real results. Free consultation.",
  keywords: "immigration consultant Delhi, Germany work visa, Canada PR, Australia PR, UK work visa, visa consultant India",
  metadataBase: new URL("https://infiniximmigration.com"),
  alternates: {
    canonical: "https://infiniximmigration.com",
  },
  openGraph: {
    title: "Infinix Immigration Services - Honest Immigration Guidance",
    description: "Clear, transparent visa and PR consultation for Germany, Canada & Australia. No false promises.",
    url: "https://infiniximmigration.com",
    siteName: "Infinix Immigration Services",
    type: "website",
    images: [
      {
        url: "https://infiniximmigration.com/og-image.jpg",
        alt: "Infinix Immigration Services",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: "Infinix Immigration Services",
    description: "Transparent immigration guidance you can trust.",
    images: ["https://infiniximmigration.com/twitter-image.jpg"],
  },
  robots: {
    index: true,
    follow: true,
  },
};

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