"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.watchGraphMoveSubgraphEvent = watchGraphMoveSubgraphEvent;
function watchGraphMoveSubgraphEvent(event, graph, callback) {
    const listener = (...[graphId, graphBundle, graphSpec, nextSpecId, nodeIds, nextIdMap, nextPinIdMap, nextMergePinId, nextPlugSpec, nextSubComponentParentMap, nextSubComponentChildrenMap, nextSubComponentIndexMap, nextUnitPinMergeMap, path,]) => {
        callback({
            type: 'graph',
            event,
            data: {
                graphId,
                graphBundle,
                graphSpec,
                nodeIds,
                nextSpecId,
                nextIdMap,
                nextPinIdMap,
                nextMergePinId,
                nextPlugSpec,
                nextSubComponentParentMap,
                nextSubComponentChildrenMap,
                nextSubComponentIndexMap,
                nextUnitPinMergeMap,
                path,
            },
        });
    };
    graph.prependListener(event, listener);
    return () => {
        graph.removeListener(event, listener);
    };
}
//# sourceMappingURL=watchGraphMoveSubgraphIntoEvent.js.map