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