import{r as e}from"./chunk-QTnfLwEv.js";import{o as t}from"./jsx-runtime-DHSfUA5-.js";var n=e(t(),1);function r(){let[,e]=(0,n.useState)(0);return(0,n.useCallback)(()=>e(e=>e+1),[])}function i(e,t){let i=r();(0,n.useLayoutEffect)(()=>{if(e)return e(e=>{(!t||t(e))&&i()}).dispose},[e,i,t])}export{i as t};
//# sourceMappingURL=use-watch-event-Bmff5Oxc.js.map