"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStyles = void 0;
var tslib_1 = require("tslib");
var Styling_1 = require("@fluentui/react/lib/Styling");
var getStyles = function (props) {
    var _a, _b;
    var className = props.className, width = props.width, barHeight = props.barHeight, shouldHighlight = props.shouldHighlight, theme = props.theme, href = props.href, benchmarkColor = props.benchmarkColor, benchmarkRatio = props.benchmarkRatio, targetColor = props.targetColor, targetRatio = props.targetRatio, showTriangle = props.showTriangle;
    return {
        root: [
            theme.fonts.medium,
            'ms-StackedBarChart',
            {
                width: width ? width : '100%',
                display: 'flex',
                flexDirection: 'column',
            },
            className,
        ],
        chart: {
            width: '100%',
            height: barHeight ? barHeight : 12,
            display: 'block',
            marginBottom: showTriangle ? '16px' : '10px',
            overflow: 'visible',
        },
        chartTitle: tslib_1.__assign(tslib_1.__assign({}, theme.fonts.small), { display: 'flex', justifyContent: 'space-between' }),
        chartTitleLeft: {
            textOverflow: 'ellipsis',
            overflow: 'hidden',
            whiteSpace: 'nowrap',
            display: 'block',
            color: theme.palette.neutralPrimary,
            marginBottom: '5px',
        },
        legendContainer: {
            margin: '4px 0px 0px 4px',
        },
        opacityChangeOnHover: {
            opacity: shouldHighlight ? '' : '0.1',
            cursor: href ? 'pointer' : 'default',
            selectors: {
                '&:focus': {
                    stroke: theme.palette.black,
                    strokeWidth: '2px',
                },
            },
        },
        ratioNumerator: {
            fontSize: Styling_1.FontSizes.medium,
            fontWeight: Styling_1.FontWeights.semibold,
            color: theme.palette.neutralPrimary,
        },
        ratioDenominator: {
            fontSize: Styling_1.FontSizes.medium,
            color: theme.palette.neutralPrimary,
        },
        benchmarkContainer: {
            position: 'relative',
            height: '7px',
            marginTop: '-3px',
            marginBottom: '-1px',
        },
        benchmark: {
            position: 'absolute',
            left: 'calc(' + benchmarkRatio + '% - 4px)',
            width: '0',
            height: '0',
            borderLeft: '4px solid transparent',
            borderRight: '4px solid transparent',
            borderTop: '7px solid',
            borderTopColor: benchmarkColor,
            marginBottom: '4px',
            selectors: (_a = {},
                _a[Styling_1.HighContrastSelector] = {
                    border: '0px',
                    height: '7px',
                    width: '7px',
                    clipPath: 'polygon(50% 100%, 0 0, 100% 0)',
                    backgroundImage: "linear-gradient(to right, ".concat(benchmarkColor, ", ").concat(benchmarkColor, ")"),
                },
                _a),
        },
        target: {
            position: 'absolute',
            left: 'calc(' + targetRatio + '% - 4px)',
            width: '0',
            height: '0',
            borderLeft: '4px solid transparent',
            borderRight: '4px solid transparent',
            borderTop: '7px solid',
            borderTopColor: targetColor,
            marginBottom: '4px',
            selectors: (_b = {},
                _b[Styling_1.HighContrastSelector] = {
                    border: '0px',
                    height: '7px',
                    width: '7px',
                    clipPath: 'polygon(50% 100%, 0 0, 100% 0)',
                    backgroundImage: "linear-gradient(to right, ".concat(targetColor, ", ").concat(targetColor, ")"),
                },
                _b),
        },
    };
};
exports.getStyles = getStyles;
//# sourceMappingURL=StackedBarChart.styles.js.map