import type { Metadata } from "next";
import { JetBrains_Mono, Manrope } from "next/font/google";
import { NuqsAdapter } from "nuqs/adapters/next/app";
import AthenaEngineStatus from "./components/AthenaEngineStatus";
import ThemeSwitchFab from "./components/ThemeSwitchFab";
import { TooltipProvider } from "./components/ui/tooltip";
import { Toaster } from "./components/ui/sonner";
import { SettingsProvider } from "./lib/settings";
import { ThemeProvider } from "./lib/theme";
import "./globals.css";

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

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

export const metadata: Metadata = {
  title: "Athena Studio",
  description:
    "Database gateway studio — browse, query, and manage your databases",
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en" className="dark" suppressHydrationWarning>
      <body
        className={`${manrope.variable} ${jetbrainsMono.variable} antialiased`}
      >
        <NuqsAdapter>
          <ThemeProvider>
            <SettingsProvider>
              <TooltipProvider delayDuration={200}>
                {children}
                <AthenaEngineStatus />
                <ThemeSwitchFab />
                <Toaster />
              </TooltipProvider>
            </SettingsProvider>
          </ThemeProvider>
        </NuqsAdapter>
      </body>
    </html>
  );
}
