"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ActiveAlertsPanelItemLabel = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const rebass_1 = require("rebass");
const icons_1 = require("../../components/icons");
const UIHelper_1 = tslib_1.__importDefault(require("../UIHelper"));
const ActiveAlertsPanelItemLabel = (props) => {
    const iconColor = UIHelper_1.default.getColorByMessageType(props.data.alertDefinition.MessageType);
    const iconStyle = {
        color: iconColor,
        fill: iconColor,
    };
    const iconName = UIHelper_1.default.getGlyphByMessageType(props.data.alertDefinition.MessageType);
    const IconCmp = icons_1.allIcons[iconName];
    const icon = IconCmp ? React.createElement(IconCmp, null) : null;
    return (React.createElement(rebass_1.Box, null,
        React.createElement(rebass_1.Text, { style: { float: 'left', ...iconStyle } }, icon),
        props.data.header));
};
exports.ActiveAlertsPanelItemLabel = ActiveAlertsPanelItemLabel;
