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

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

export const metadata: Metadata = {
  title: "Global Pathways - International Student Recruitment for Korean Universities",
  description: "Connect qualified international students with Korean universities. 600+ students recruited from 33 countries with capability in 91 markets. Strategic partnerships & comprehensive support.",
  keywords: "international student recruitment, Korean universities, education partnership, global recruitment network, student visa support",
  metadataBase: new URL("https://globalpathways.example.com"),
  alternates: {
    canonical: "https://globalpathways.example.com",
  },
  openGraph: {
    title: "Global Pathways - Your International Student Recruitment Partner",
    description: "Recruit qualified international students to Korean universities through our global network spanning 33 countries with capability in 91 markets.",
    url: "https://globalpathways.example.com",
    siteName: "Global Pathways",
    type: "website",
  },
  twitter: {
    card: "summary_large_image",
    title: "Global Pathways - International Student Recruitment",
    description: "Connect international students with Korean universities. 600+ placements, 33 countries reached.",
  },
  robots: {
    index: true,
    follow: true,
  },
};

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