import {hookstate, SetStateAction} from '@hookstate/core'

export const loadingState = hookstate(false)
export const loadingAndSaveState = hookstate(false)
export const loadingAndContinueState = hookstate(false)
export const openAndCloseDeleteDialogue = hookstate(false)
export const openAndCloseSearchDialogue = hookstate(false)
export const showFiltersModuleState = hookstate(false)
export const searchCompletedState = hookstate(false)

export const changeLoadState = (bool: SetStateAction<boolean>) => {
    loadingState.set(bool)
    loadingAndContinueState.set(bool)
    loadingAndSaveState.set(bool)
}