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