import { useState } from 'react';

const useToggleState = (initialState)=>{
    const [isOpen, setIsOpen] = useState(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
