"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.watchGraphExposePinEvent = watchGraphExposePinEvent;
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);
    };
}
//# sourceMappingURL=watchGraphExposedPinEvent.js.map