"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeDragCancelListener = makeDragCancelListener;
exports.listenDragCancel = listenDragCancel;
function makeDragCancelListener(listener, _global = false) {
    return (component) => {
        return listenDragCancel(component, listener, _global);
    };
}
function listenDragCancel(component, listener, _global = false) {
    const { $element } = component;
    const dragCancelListener = (_event) => {
        const { detail } = _event;
        listener(detail);
    };
    $element.addEventListener('dragcancel', dragCancelListener, _global);
    return () => {
        $element.removeEventListener('dragcancel', dragCancelListener, _global);
    };
}
//# sourceMappingURL=dragcancel.js.map