"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeEndedListener = makeEndedListener;
exports.listenEnded = listenEnded;
function makeEndedListener(listener) {
    return (component) => {
        return listenEnded(component, (event, _event) => {
            listener(event, _event);
        });
    };
}
function listenEnded(component, onEnded) {
    const { $element } = component;
    const endedListener = (_event) => {
        const {} = _event;
        onEnded({}, _event);
    };
    $element.addEventListener('ended', endedListener, { passive: true });
    return () => {
        $element.removeEventListener('ended', endedListener);
    };
}
//# sourceMappingURL=ended.js.map