"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PercentBarPreview = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const rebass_1 = require("rebass");
const PercentBarStylePreview_1 = require("./PercentBarStylePreview");
const PercentBarPreview = (props) => {
    let postfix = '';
    if (props.percentBarStyle.RangeValueType === 'Percentage') {
        postfix = '%';
    }
    return (React.createElement(React.Fragment, null, props.percentBarStyle.CellRanges.map((range, i) => (React.createElement(rebass_1.Flex, { key: i, alignItems: "stretch", mr: 3, mb: 2 },
        React.createElement(rebass_1.Flex, { flexBasis: 120, alignItems: "center", mr: 3 },
            range.Min,
            postfix,
            " to ",
            range.Max,
            postfix,
            ' '),
        React.createElement(PercentBarStylePreview_1.PercentBarStylePreview, { backgroundColor: props.percentBarStyle.BackColor, barBackgroundColor: range.Color, cellText: props.percentBarStyle.CellText, toolTipText: props.percentBarStyle.ToolTipText }))))));
};
exports.PercentBarPreview = PercentBarPreview;
