"use strict";var g=require("react");const i=({isSelected:e,onChange:c,defaultSelected:r=!1})=>{const[S,s]=g.useState(r),t=e!==void 0,u=t?e:S,l=a=>{t||s(a),c&&c(a)},d=()=>l(!u);return g.useEffect(()=>{t&&s(e)},[e]),{isSelected:u,setSelected:l,toggle:d}};exports.useToggleState=i;
//# sourceMappingURL=useToggleState.js.map
