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