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