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