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