import '../../../../../../node_modules/preact/compat/dist/compat.module.mjs';
import { useState as h } from '../../../../../../node_modules/preact/hooks/dist/hooks.module.mjs';

const useToggleState = (initialState)=>{
    const [isOpen, setIsOpen] = h(false);
    const toggle = ()=>setIsOpen((prev)=>!prev);
    const open = ()=>setIsOpen(true);
    const close = ()=>setIsOpen(false);
    return {
        close,
        isOpen,
        open,
        toggle
    };
};

export { useToggleState };
//# sourceMappingURL=useToggleState.mjs.map
