import{o as e}from"./rolldown-runtime.C0FnF6B9.js";import{r as t}from"./emotion-is-prop-valid.esm.CuYlOKOk.js";import{S as n}from"./Tooltip.bbzhtE2V.js";var r=e(t(),1);function i(e={}){let{isReadOnly:t}=e,[i,a]=n(e.isSelected,e.defaultSelected||!1,e.onChange),[o]=(0,r.useState)(i);function s(e){t||a(e)}function c(){t||a(!i)}return{isSelected:i,defaultSelected:e.defaultSelected??o,setSelected:s,toggle:c}}export{i as t};