import { useControlledState as n } from "../../utils/dist/module.es.js";
function o(e = {}) {
  let { isReadOnly: t } = e, [l, c] = n(e.isSelected, e.defaultSelected || !1, e.onChange);
  function d(f) {
    t || c(f);
  }
  function a() {
    t || c(!l);
  }
  return {
    isSelected: l,
    setSelected: d,
    toggle: a
  };
}
export {
  o as useToggleState
};
//# sourceMappingURL=module.es.js.map
