"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.extractSetPinSetDefaultIgnoredEventData = extractSetPinSetDefaultIgnoredEventData;
exports.stringifySetPinSetDefaultIgnoredEventData = stringifySetPinSetDefaultIgnoredEventData;
exports.watchGraphSetPinSetDefaultIgnored = watchGraphSetPinSetDefaultIgnored;
function extractSetPinSetDefaultIgnoredEventData(...[type, pinId, defaultIgnored, path]) {
    return {
        type,
        pinId,
        defaultIgnored,
        path,
    };
}
function stringifySetPinSetDefaultIgnoredEventData(data) {
    return data;
}
function watchGraphSetPinSetDefaultIgnored(event, graph, callback) {
    const listener = (...args) => {
        const data = stringifySetPinSetDefaultIgnoredEventData(extractSetPinSetDefaultIgnoredEventData(...args));
        callback({
            type: 'graph',
            event,
            data,
        });
    };
    graph.prependListener(event, listener);
    return () => {
        graph.removeListener(event, listener);
    };
}
//# sourceMappingURL=watchGraphSetPinSetDefaultIgnored.js.map