import { createObservableStore , SetStore } from "../../../react/store/ObservableStore" ; import { Provider } from "polar-shared/src/util/Providers" ; export interface IAddFileDropzoneStore { readonly active : boolean ; } export interface IAddFileDropzoneCallbacks { readonly setActive : ( active : boolean ) => void ; } const initialStore = { active : false , } ; interface Mutator { } function mutatorFactory ( storeProvider , setStore ) { return { } ; } function callbacksFactory ( storeProvider , setStore , mutator ) { function setActive ( active ) { const store = storeProvider ( ) ; if ( store . active !== active ) { setStore ( { active } ) ; } } return { setActive } ; } const observableStore = createObservableStore < IAddFileDropzoneStore , Mutator , IAddFileDropzoneCallbacks > ( { initialValue : initialStore , mutatorFactory , callbacksFactory } ) ; export const [ AddFileDropzoneProvider , useAddFileDropzoneStore , useAddFileDropzoneCallbacks , useAddFileDropzoneMutator ] = observableStore ; AddFileDropzoneProvider . displayName = 'AddFileDropzoneProvider' ;