import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import { ThemeProvider } from "next-themes";
import { Toaster } from "@/components/ui/sonner";
import { TooltipProvider } from "@/components/ui/tooltip";

const geistSans = Geist({
	subsets: ["latin", "cyrillic"],
	variable: "--font-geist-sans",
});

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

export const metadata: Metadata = {
	title: "Local Calendar",
	description: "Event timeline console with AI capture",
	creator: "Dmytro Stanchiev",
};

export default function RootLayout({
	children,
}: Readonly<{
	children: React.ReactNode;
}>) {
	return (
		<html lang="en" suppressHydrationWarning>
			<body
				className={`${geistSans.variable} ${geistMono.variable} font-sans antialiased min-h-screen flex flex-col`}
			>
				<ThemeProvider
					attribute="class"
					defaultTheme="light"
					enableColorScheme
					enableSystem
					disableTransitionOnChange
				>
					<TooltipProvider delayDuration={300}>
						<main className="flex-1">{children}</main>
						<Toaster
							closeButton
							richColors
							toastOptions={{
								className:
									"rounded-[10px] bg-card text-card-foreground shadow-lg",
							}}
						/>
					</TooltipProvider>
				</ThemeProvider>
			</body>
		</html>
	);
}
