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: "EduPath - Career Counseling & Educational Workshops",
  description: "Expert psychometric career counseling and university application workshops for schools, colleges, and universities. Transform educational futures with personalized guidance.",
  keywords: "career counseling, psychometric assessment, university applications, educational workshops, higher studies guidance, student counseling",
  metadataBase: new URL("https://edupath.example.com"),
  alternates: {
    canonical: "https://edupath.example.com",
  },
  openGraph: {
    title: "EduPath - Career Counseling & Educational Workshops",
    description: "Transform your educational journey with expert psychometric career counseling and strategic workshop programs.",
    url: "https://edupath.example.com",
    siteName: "EduPath",
    type: "website",
    images: [
      {
        url: "http://img.b2bpic.net/free-photo/classmates-reading-learning-from-notes-laptop_23-2149265732.jpg",
        alt: "EduPath Educational Workshop Platform",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: "EduPath - Career Counseling & Educational Workshops",
    description: "Expert psychometric assessment and university application guidance.",
    images: [
      "http://img.b2bpic.net/free-photo/classmates-reading-learning-from-notes-laptop_23-2149265732.jpg",
    ],
  },
  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>
  );
}