import "./global.css";
import { RootProvider } from "fumadocs-ui/provider/next";
import { Outfit, Inter, Geist_Mono } from "next/font/google";
import type { ReactNode } from "react";
import type { Metadata } from "next";

const outfit = Outfit({
  variable: "--font-outfit",
  subsets: ["latin"],
  weight: ["400", "500", "600", "700", "800"],
});

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

const geistMono = Geist_Mono({
  variable: "--font-geist-mono",
  subsets: ["latin"],
});

export const metadata: Metadata = {
  title: {
    template: "%s | ktx Docs",
    default: "ktx Docs",
  },
  description:
    "Open-source context infrastructure that makes agentic analytics reliable.",
  icons: {
    icon: "/ktx/brand/ktx-mascot.svg",
    shortcut: "/ktx/brand/ktx-mascot.svg",
  },
};

export default function RootLayout({ children }: { children: ReactNode }) {
  return (
    <html
      lang="en"
      className={`${outfit.variable} ${inter.variable} ${geistMono.variable}`}
      suppressHydrationWarning
    >
      <body>
        <RootProvider search={{ options: { api: "/ktx/api/search" } }}>
          <div className="ktx-site-shell">{children}</div>
        </RootProvider>
      </body>
    </html>
  );
}
