import { onScopeDispose } from "vue";
import { getScrollParents } from "@veno-ui/utils";
function bindScroll(el, onScroll) {
  const scrollElements = [document, ...getScrollParents(el)];
  scrollElements.forEach((el2) => {
    el2.addEventListener("scroll", onScroll, { passive: true });
  });
  onScopeDispose(() => {
    scrollElements.forEach((el2) => {
      el2.removeEventListener("scroll", onScroll);
    });
  });
}
export {
  bindScroll
};
//# sourceMappingURL=util.mjs.map
