import type { Metadata } from "next";
import { Halant } from "next/font/google";
import { Inter } from "next/font/google";
import { Roboto } 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 roboto = Roboto({
  variable: "--font-roboto",
  subsets: ["latin"],
  weight: ["100", "300", "400", "500", "700", "900"],
});

export const metadata: Metadata = {
  title: "Premium Social Media Agency | SocialPeak",
  description: "Transform your brand through strategic social media management. SocialPeak delivers results-driven campaigns for premium brands.",
  keywords: "social media agency, social media marketing, content creation, community management, brand growth",
  metadataBase: new URL("https://socialpeak.agency"),
  alternates: {
    canonical: "https://socialpeak.agency",
  },
  openGraph: {
    title: "Premium Social Media Agency | SocialPeak",
    description: "Transform your brand through strategic social media management. SocialPeak delivers results-driven campaigns for premium brands.",
    url: "https://socialpeak.agency",
    siteName: "SocialPeak",
    type: "website",
    images: [
      {
        url: "http://img.b2bpic.net/free-photo/map-lying-wooden-table_53876-105723.jpg",
        alt: "SocialPeak Social Media Agency",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: "Premium Social Media Agency | SocialPeak",
    description: "Transform your brand through strategic social media management",
    images: ["http://img.b2bpic.net/free-photo/map-lying-wooden-table_53876-105723.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} ${roboto.variable} antialiased`}
        >
          <Tag />
          {children}
          <script
              dangerouslySetInnerHTML={{
                  __html: `${getVisualEditScript()}`
          }}
        />
        </body>
      </ServiceWrapper>
    </html>
  );
}