export interface MultitaskStoreState { isOpen : boolean ; } export enum MultitaskStoreActions { SET_MULTITASK_OPEN_STATE = 'SET_MULTITASK_OPEN_STATE' } const defaultState = { isOpen : false , } ; function MultitaskStore ( state = defaultState , action ) { if ( action . type === MultitaskStoreActions . SET_MULTITASK_OPEN_STATE ) { return { ... state , isOpen : action . payload . isOpen , } ; } return state ; } export function setMultitaskOpen ( isOpen ) { return { type : MultitaskStoreActions . SET_MULTITASK_OPEN_STATE , payload : { isOpen , } , } ; } export default MultitaskStore ;