"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.watchGraphDestroyEvent = watchGraphDestroyEvent;
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