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

export const metadata: Metadata = {
  title: "Premium School Media Agency | Professional Video Production",
  description: "MediaVision Academy specializes in professional media production for schools. Video production, live streaming, photography, and content creation tailored for educational institutions.",
  keywords: "school media production, educational video, live streaming, content creation, professional photography",
  metadataBase: new URL("https://mediavisionacademy.com"),
  alternates: {
    canonical: "https://mediavisionacademy.com",
  },
  robots: {
    index: true,
    follow: true,
  },
  openGraph: {
    title: "Premium School Media Agency | MediaVision Academy",
    description: "Transform your school's narrative with professional media production and content creation services.",
    url: "https://mediavisionacademy.com",
    siteName: "MediaVision Academy",
    type: "website",
    images: [
      {
        url: "http://img.b2bpic.net/free-photo/medium-shot-people-talking-radio-station_23-2148802327.jpg",
        alt: "Professional media production for schools",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: "Premium School Media Agency | MediaVision Academy",
    description: "Professional media production and content creation for educational institutions.",
    images: ["http://img.b2bpic.net/free-photo/medium-shot-people-talking-radio-station_23-2148802327.jpg"],
  },
};

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