import { Inter, JetBrains_Mono } from "next/font/google";
import type { Metadata } from "next";
import { SessionProvider } from "next-auth/react";
import "./globals.css";

const inter = Inter({ subsets: ["latin"], variable: "--font-inter", display: "swap" });
const jetbrainsMono = JetBrains_Mono({ subsets: ["latin"], variable: "--font-jetbrains", display: "swap" });

export const metadata: Metadata = {
  metadataBase: new URL("https://agentlens.vectry.tech"),
  title: {
    default: "AgentLens — Agent Observability Platform",
    template: "%s | AgentLens",
  },
  description:
    "Open-source agent observability that traces decisions, not just API calls. Monitor AI agent reasoning, tool selection, and routing in real-time.",
  keywords: [
    "agent observability",
    "AI monitoring",
    "LLM tracing",
    "agent decisions",
    "AI debugging",
    "tool selection tracing",
    "multi-agent observability",
    "open source",
  ],
  authors: [{ name: "Vectry" }],
  creator: "Vectry",
  icons: {
    icon: [
      { url: "/favicon.ico", sizes: "any" },
      { url: "/icon.png", sizes: "512x512", type: "image/png" },
    ],
    apple: [{ url: "/apple-icon.png", sizes: "180x180" }],
  },
  openGraph: {
    type: "website",
    locale: "en_US",
    url: "https://agentlens.vectry.tech",
    siteName: "AgentLens",
    title: "AgentLens — Agent Observability Platform",
    description:
      "Open-source agent observability that traces decisions, not just API calls. Monitor AI agent reasoning, tool selection, and routing in real-time.",
    images: [
      {
        url: "/og-image.png",
        width: 1200,
        height: 630,
        alt: "AgentLens — Agent Observability Platform",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: "AgentLens — Agent Observability Platform",
    description:
      "Open-source agent observability that traces decisions, not just API calls. Monitor AI agent reasoning, tool selection, and routing in real-time.",
    images: ["/og-image.png"],
  },
  robots: {
    index: true,
    follow: true,
    googleBot: {
      index: true,
      follow: true,
      "max-video-preview": -1,
      "max-image-preview": "large",
      "max-snippet": -1,
    },
  },
  alternates: {
    canonical: "https://agentlens.vectry.tech",
  },
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en" className="dark">
      <body className={`${inter.variable} ${jetbrainsMono.variable} bg-neutral-950 text-neutral-100 antialiased`}>
        <a
          href="#main-content"
          className="sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-[200] focus:px-4 focus:py-2 focus:rounded-lg focus:bg-emerald-500 focus:text-neutral-950 focus:font-semibold focus:text-sm focus:outline-none focus:ring-2 focus:ring-emerald-400 focus:ring-offset-2 focus:ring-offset-neutral-950"
        >
          Skip to content
        </a>
        <SessionProvider>{children}</SessionProvider>
      </body>
    </html>
  );
}
