"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.extractMoveSubgraphOutOfEventData = extractMoveSubgraphOutOfEventData;
exports.stringifyMoveSubgraphOutOfEventData = stringifyMoveSubgraphOutOfEventData;
exports.watchGraphMoveSubgraphOutOfEvent = watchGraphMoveSubgraphOutOfEvent;
function extractMoveSubgraphOutOfEventData(...[graphId, spec, selection, mapping, moves, path,]) {
    return {
        graphId,
        spec,
        selection,
        mapping,
        moves,
        path,
    };
}
function stringifyMoveSubgraphOutOfEventData(data) {
    return data;
}
function watchGraphMoveSubgraphOutOfEvent(event, graph, callback) {
    const listener = (...args) => {
        const data = stringifyMoveSubgraphOutOfEventData(extractMoveSubgraphOutOfEventData(...args));
        callback({
            type: 'graph',
            event,
            data,
        });
    };
    graph.prependListener(event, listener);
    return () => {
        graph.removeListener(event, listener);
    };
}
//# sourceMappingURL=watchGraphMoveSubgraphOutEvent.js.map