"use client"; import { createContext, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useState, } from "react"; import type { ReactNode } from "react"; import { THEMES, THEME_CLASSES, DARK_SURFACES, themeColorScheme, type ThemeName, type RawTheme, } from "@/lib/themes"; import { saveUserTheme } from "@/lib/actions/profile"; // Re-exported so existing imports keep working. export { THEMES, DARK_SURFACES }; export type { ThemeName, RawTheme }; /** * App theme provider (replaces next-themes). * * next-themes injects its no-FOUC script as a