"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");exports.useMotionRef=function(t,n,r){const u=e.useRef(r);e.useInsertionEffect((()=>{u.current=r}));const o=e.useRef(null);return e.useCallback((e=>{e&&t.onMount?.(e),n&&(e?n.mount(e):n.unmount());const r=u.current;if("function"==typeof r)if(e){const t=r(e);"function"==typeof t&&(o.current=t)}else o.current?(o.current(),o.current=null):r(e);else r&&(r.current=e)}),[n])};
//# sourceMappingURL=use-motion-ref.mjs.js.map
