"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.watchGraphUnitComponentRemoveEvent = void 0;
function watchGraphUnitComponentRemoveEvent(event, graph, callback) {
    const listener = (unitId, path) => {
        callback({
            type: 'graph',
            event,
            data: {
                unitId,
                path,
            },
        });
    };
    graph.prependListener(event, listener);
    return () => {
        graph.removeListener(event, listener);
    };
}
exports.watchGraphUnitComponentRemoveEvent = watchGraphUnitComponentRemoveEvent;
//# sourceMappingURL=watchGraphUnitComponentRemoveEvent.js.map