"use strict";const v=require("react"),f=require("./index-kcwFA4Dv.js");function b(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=b(v);function m(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function p({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=C({defaultProp:t,onChange:n}),u=e!==void 0,i=u?e:r,l=f.useCallbackRef(n),d=c.useCallback(s=>{if(u){const a=typeof s=="function"?s(e):s;a!==e&&l(a)}else o(s)},[u,e,o,l]);return[i,d]}function C({defaultProp:e,onChange:t}){const n=c.useState(e),[r]=n,o=c.useRef(r),u=f.useCallbackRef(t);return c.useEffect(()=>{o.current!==r&&(u(r),o.current=r)},[r,o,u]),n}function P(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}exports.composeEventHandlers=m;exports.useControllableState=p;exports.usePrevious=P;
//# sourceMappingURL=index-CxBG4Ssm.js.map
