"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.listenDragCancel = exports.makeDragCancelListener = void 0;
function makeDragCancelListener(listener, _global = false) {
    return (component) => {
        return listenDragCancel(component, listener, _global);
    };
}
exports.makeDragCancelListener = makeDragCancelListener;
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);
    };
}
exports.listenDragCancel = listenDragCancel;
//# sourceMappingURL=dragcancel.js.map