"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("./use-event.js");let r=Symbol();exports.optionalRef=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Object.assign(e,{[r]:t})},exports.useSyncRefs=function(){for(var n=arguments.length,u=new Array(n),o=0;o<n;o++)u[o]=arguments[o];let l=e.useRef(u);e.useEffect((()=>{l.current=u}),[u]);let s=t.useEvent((e=>{for(let t of l.current)null!=t&&("function"==typeof t?t(e):t.current=e)}));return u.every((e=>null==e||(null==e?void 0:e[r])))?void 0:s};
//# sourceMappingURL=use-sync-refs.js.map
