"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var re_reselect_1 = __importDefault(require("re-reselect"));
var get_chart_id_1 = require("../../../../state/selectors/get_chart_id");
var get_settings_specs_1 = require("../../../../state/selectors/get_settings_specs");
var compute_legend_1 = require("./compute_legend");
exports.getLegendItemsLabelsSelector = re_reselect_1.default([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;
        var _b;
        if (((_b = defaultExtra) === null || _b === void 0 ? void 0 : _b.formatted) != null) {
            return { label: "" + label + (showLegendExtra ? defaultExtra.formatted : ''), depth: 0 };
        }
        return { label: label, depth: 0 };
    });
})(get_chart_id_1.getChartIdSelector);
//# sourceMappingURL=get_legend_items_labels.js.map