import type { AppearanceMode } from '@/types/account'; export function applyAppearance(mode: AppearanceMode): void { const root = document.documentElement; root.classList.remove('dark'); if (mode === 'dark' || (mode === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches)) { root.classList.add('dark'); } } export function useAppearance() { return { applyAppearance, }; }