import{c,h as a,o as i,eL as u}from"./index-6Jqoo2rk.js";function f(l){const[n,s]=c(0);let r=!1;const t=e=>{r||(r=!0,u(()=>{r=!1,s(e.scrollTop)}))};return a(()=>{const e=l();if(!e){s(0);return}t(e);const o=()=>t(e);e.addEventListener("scroll",o,{passive:!0}),i(()=>{e.removeEventListener("scroll",o)})}),n}export{f as u};
//# sourceMappingURL=useScrollTop-BklsIon0.js.map
