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