import type { Metadata } from "next"; import { NextIntlClientProvider } from "next-intl"; import { getLocale, getMessages } from "next-intl/server"; import { Nunito } from "next/font/google"; import type { ReactNode } from "react"; import { Navigation } from "@/components/navigation"; import RadioPlayerGate from "@/components/public/radio-player-gate"; import { SiteFooter } from "@/components/site-footer"; import { SiteHeader } from "@/components/site-header"; import { ThemeVars } from "@/components/theme-vars"; import { TopHeader } from "@/components/top-header"; import { enforceSiteAccess } from "@/lib/access-guard"; import { siteSettings } from "@/lib/services/site-settings"; import "./globals.css"; const nunito = Nunito({ subsets: ["latin"], weight: ["400", "600", "700", "800"], display: "swap", variable: "--font-nunito", }); export async function generateMetadata(): Promise { const hotel = (await siteSettings.get("hotel_name", "Atom")) ?? "Atom"; return { title: { default: hotel, template: `%s · ${hotel}` }, description: `${hotel} — a Habbo retro hotel. Hang out, collect furni and meet friends.`, }; } export default async function RootLayout({ children }: { children: ReactNode }) { await enforceSiteAccess(); const locale = await getLocale(); const messages = await getMessages(); return ( {/* Apply the saved theme before first paint to avoid a light→dark flash. */}