export const CH = { themeGet: "theme:get", themeSet: "theme:set", themeChanged: "theme:changed", } as const; export type ThemeSource = "system" | "light" | "dark"; export type ThemeState = { source: ThemeSource; dark: boolean; }; export function isThemeSource(value: unknown): value is ThemeSource { return value === "system" || value === "light" || value === "dark"; }