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