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