"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.extractDestroyEventData = extractDestroyEventData;
exports.stringifyBulkEditEventData = stringifyBulkEditEventData;
exports.watchGraphDestroyEvent = watchGraphDestroyEvent;
function extractDestroyEventData([path,]) {
    return {
        path,
    };
}
function stringifyBulkEditEventData({ path }) {
    return {
        path,
    };
}
function watchGraphDestroyEvent(event, graph, callback) {
    const listener = (path = []) => {
        callback({
            type: 'unit',
            event,
            data: {
                path,
            },
        });
    };
    graph.prependListener(event, listener);
    return () => {
        graph.removeListener(event, listener);
    };
}
//# sourceMappingURL=watchGraphDestroyEvent.js.map