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