import { createReactContext } from '@wener/reaction'; import { createStore } from 'zustand'; import { mutative } from 'zustand-mutative'; export type DaisyThemeStoreState = { theme?: 'system' | 'light' | 'dark' | 'custom' | string; light?: string; dark?: string; system?: 'light' | 'dark' | string; custom?: Record; schema?: 'light' | 'dark'; active?: string; }; type ThemeStore = ReturnType; function createThemeStore() { return createStore( mutative(() => { return { theme: 'system', light: 'light', dark: 'dark', // light: 'corporate', // dark: 'business', }; }), ); } export const DaisyThemeStoreContext = createReactContext('DaisyThemeStore', createThemeStore());