import e from"../../_util/raf.mjs";import t from"../utils/isFirefox.mjs";import n from"./useOriginScroll.mjs";function r(r,i,a,o){let s=0,c=null,l=null,u=!1,d=n(i,a);function f(n){if(!r.value)return;e.cancel(c);let{deltaY:i}=n;s+=i,l=i,!d(i)&&(t||n.preventDefault(),c=e(()=>{o(s*(u?10:1)),s=0}))}function p(e){r.value&&(u=e.detail===l)}return[f,p]}export{r as default};