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

export const metadata: Metadata = {
  title: "1OF1 - Exclusive Vintage Football Streetwear",
  description: "Every piece exists once. Vintage football jerseys reimagined as singular streetwear. No restock. No duplicates. Collect the rarest pieces in fashion.",
  keywords: "streetwear, vintage jerseys, exclusive fashion, collectible apparel, scarcity-driven, underground fashion",
  robots: {
    index: true,
    follow: true,
  },
  openGraph: {
    title: "1OF1 - Exclusive Vintage Football Streetwear",
    description: "Every piece exists once. Unique streetwear pieces from reimagined vintage football jerseys.",
    type: "website",
    siteName: "1OF1",
    url: "https://1of1.com",
    images: [
      {
        url: "http://img.b2bpic.net/free-photo/contemplated-african-young-male-athlete-leaning-reflective-mirror-outdoors_23-2148124103.jpg",
        alt: "1OF1 exclusive vintage jersey streetwear collection",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: "1OF1 - Exclusive Vintage Football Streetwear",
    description: "Every piece exists once. Collect singular, unrepeatable streetwear pieces.",
    images: [
      "http://img.b2bpic.net/free-photo/contemplated-african-young-male-athlete-leaning-reflective-mirror-outdoors_23-2148124103.jpg",
    ],
  },
};

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