import type { Metadata } from "next";
import "./globals.css";
import { Providers } from "@/components/Providers";
import { THEME_BOOT_SCRIPT } from "@/lib/theme";

export const metadata: Metadata = {
    title: "Vantage HQ",
    description: "Licences, instances and billing for Vantage.",
};

/*
 * The masthead deliberately does NOT live here. It belongs to the authenticated
 * layouts, so /login, /verify and /accept-invite stop rendering a bar
 * whose navigation and account menu they cannot use.
 */
export default function RootLayout({ children }: { children: React.ReactNode }) {
    return (
        <html lang="en">
            <head>
                {/* Runs before first paint, so a dark-preferring viewer never sees white. */}
                <script dangerouslySetInnerHTML={{ __html: THEME_BOOT_SCRIPT }} />
            </head>
            <body>
                <Providers>{children}</Providers>
            </body>
        </html>
    );
}
