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