"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 compute_legend_1 = require("./compute_legend");
var getHighlightedLegendItemKey = function (state) { return state.interactions.highlightedLegendItemKey; };
exports.getHighlightedSeriesSelector = re_reselect_1.default([getHighlightedLegendItemKey, compute_legend_1.computeLegendSelector], function (highlightedLegendItemKey, legendItems) {
    if (!highlightedLegendItemKey) {
        return;
    }
    return legendItems.find(function (_a) {
        var key = _a.seriesIdentifier.key;
        return key === highlightedLegendItemKey;
    });
})(get_chart_id_1.getChartIdSelector);
//# sourceMappingURL=get_highlighted_series.js.map