import type { Metadata, Viewport } from "next"; import { NextIntlClientProvider } from 'next-intl'; import { getLocale, getMessages } from 'next-intl/server'; import { Inter } from "next/font/google"; import Script from "next/script"; import "./globals.css"; import { ThemeProvider } from "@/hooks/use-theme"; import { ThemedToaster } from "@/components/themed-toaster"; import { DEFAULT_MODE, DEFAULT_THEME, MODE_STORAGE_KEY, MODES, STORAGE_KEY, THEME_IDS, } from "@/lib/themes"; const inter = Inter({ variable: "--font-sans", subsets: ["latin"], }); export const metadata: Metadata = { title: { default: "wacrm", template: "%s — wacrm", }, description: "Self-hostable CRM template for WhatsApp.", robots: { index: false, follow: false, }, icons: { icon: [{ url: "/icon" }], }, formatDetection: { email: false, address: false, telephone: false, }, }; export const viewport: Viewport = { themeColor: "#020617", colorScheme: "dark light", }; // Inline boot script — runs before React hydrates so the user's // chosen accent (data-theme) AND mode (data-mode) are on the // element before first paint. Without this every page load flashes // the server-rendered defaults for a frame before the React tree // mounts and applies the picked values. // // Kept dependency-free (no imports, no JSX) — must be a string the // browser can run as a single