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