import * as React from 'react';
import { PercentBarStylePreview } from './PercentBarStylePreview';
import { Flex } from '../../../../../components/Flex';
export 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(Flex, { key: i, alignItems: "stretch", className: "twa:mr-3 twa:mb-2" },
        React.createElement(Flex, { className: "twa:basis-[120px] twa:mr-3", alignItems: "center" },
            range.Min,
            postfix,
            " to ",
            range.Max,
            postfix),
        React.createElement(PercentBarStylePreview, { backgroundColor: props.percentBarStyle.BackColor, barBackgroundColor: range.Color, cellText: props.percentBarStyle.CellText, toolTipText: props.percentBarStyle.ToolTipText }))))));
};
