"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.listenScroll = exports.makeScrollListener = void 0;
function makeScrollListener(listener) {
    return (component) => {
        return listenScroll(component, (event, _event) => {
            listener(event, _event);
        });
    };
}
exports.makeScrollListener = makeScrollListener;
function listenScroll(component, onWheel) {
    const { $element } = component;
    const scrollListener = (_event) => {
        const {} = _event;
        onWheel({}, _event);
    };
    $element.addEventListener('scroll', scrollListener, { passive: true });
    return () => {
        $element.removeEventListener('scroll', scrollListener);
    };
}
exports.listenScroll = listenScroll;
//# sourceMappingURL=scroll.js.map