import{a as e}from"./chunk-Cyuzqnbw.js";import{i as t}from"./bundle-mjs-DssaXR6m.js";var n=e(t());function r({controlled:e,default:t,name:r,state:i=`value`}){let{current:a}=n.useRef(e!==void 0),[o,s]=n.useState(t);return[a?e:o,n.useCallback(e=>{a||s(e)},[])]}export{r as t};