import{a as e,n as t}from"./preload-helper-DxX6f4wy.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)},[])]}function i({props:e,states:t,muiFormControl:n}){return t.reduce((t,r)=>(t[r]=e[r],n&&e[r]===void 0&&(t[r]=n[r]),t),{})}var a=n.createContext(void 0);function o(){return n.useContext(a)}export{r as i,a as n,i as r,o as t};