"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.listenDragLeave = exports.makeDragLeaveListener = void 0;
function makeDragLeaveListener(listener, _global = false) {
    return (component) => {
        return listenDragLeave(component, listener);
    };
}
exports.makeDragLeaveListener = makeDragLeaveListener;
function listenDragLeave(component, listener, _global = false) {
    const { $element } = component;
    const dragLeaveListener = (_event) => {
        const { detail } = _event;
        listener(detail);
    };
    $element.addEventListener('_dragleave', dragLeaveListener, _global);
    return () => {
        $element.removeEventListener('_dragleave', dragLeaveListener, _global);
    };
}
exports.listenDragLeave = listenDragLeave;
//# sourceMappingURL=dragleave.js.map