import React from 'react';
import classnames from 'classnames';
import { useStyles } from './styles';
export var ChartLegend = function (_a) {
    var payload = _a.payload, alignRight = _a.alignRight;
    var isTwoCols = payload.length > 8;
    var styles = useStyles();
    return (React.createElement("div", { className: classnames(styles.wrapper, { isTwoCols: isTwoCols, alignRight: alignRight }) }, payload.map(function (item) { return (React.createElement("div", { key: item.id, className: styles.item },
        React.createElement("div", { style: { background: item.color }, className: styles.itemColor }),
        React.createElement("span", { className: styles.value }, item.value))); })));
};
