2025-12-07 19:32:53 +02:00
|
|
|
import { createContext } from 'react';
|
|
|
|
|
|
|
|
|
|
import type { Theme, ThemeMode } from '@/types/theme';
|
|
|
|
|
|
|
|
|
|
export interface ThemeContextValue {
|
|
|
|
|
currentTheme: Theme;
|
|
|
|
|
availableThemes: Theme[];
|
|
|
|
|
setTheme: (themeId: string) => void;
|
2026-02-01 18:29:34 +02:00
|
|
|
customThemesLoading: boolean;
|
|
|
|
|
reloadCustomThemes: () => Promise<void>;
|
2025-12-07 19:32:53 +02:00
|
|
|
isSystemPreference: boolean;
|
|
|
|
|
setSystemPreference: (use: boolean) => void;
|
|
|
|
|
themeMode: ThemeMode;
|
|
|
|
|
setThemeMode: (mode: ThemeMode) => void;
|
|
|
|
|
lightThemeId: string;
|
|
|
|
|
darkThemeId: string;
|
|
|
|
|
setLightThemePreference: (themeId: string) => void;
|
|
|
|
|
setDarkThemePreference: (themeId: string) => void;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const ThemeSystemContext = createContext<ThemeContextValue | undefined>(undefined);
|