import{r as e}from"./index-d9e0bbb9.js";function p(l){const{controlled:t,default:n,name:d,state:f="value"}=l,{current:o}=e.useRef(t!==void 0),[a,s]=e.useState(n),u=o?t:a,r=e.useCallback(c=>{o||s(c)},[]);return[u,r]}export{p as u};
