"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getLegendItemsLabelsSelector = void 0;
var create_selector_1 = require("../../../../state/create_selector");
var get_settings_specs_1 = require("../../../../state/selectors/get_settings_specs");
var compute_legend_1 = require("./compute_legend");
exports.getLegendItemsLabelsSelector = create_selector_1.createCustomCachedSelector([compute_legend_1.computeLegendSelector, get_settings_specs_1.getSettingsSpecSelector], function (legendItems, _a) {
    var showLegendExtra = _a.showLegendExtra;
    return legendItems.map(function (_a) {
        var label = _a.label, defaultExtra = _a.defaultExtra;
        if ((defaultExtra === null || defaultExtra === void 0 ? void 0 : defaultExtra.formatted) != null) {
            return { label: "" + label + (showLegendExtra ? defaultExtra.formatted : ''), depth: 0 };
        }
        return { label: label, depth: 0 };
    });
});
//# sourceMappingURL=get_legend_items_labels.js.map