"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.watchGraphForkEvent = void 0;
function watchGraphForkEvent(event, graph, callback) {
    const listener = (specId, spec, path) => {
        callback({
            type: 'graph',
            event,
            data: {
                path,
                specId,
                spec,
            },
        });
    };
    graph.prependListener(event, listener);
    return () => {
        graph.removeListener(event, listener);
    };
}
exports.watchGraphForkEvent = watchGraphForkEvent;
//# sourceMappingURL=watchGraphForkEvent.js.map