"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PieLegend = void 0;
const react_1 = __importDefault(require("react"));
const inlines_1 = require("inlines");
const Text_1 = require("../Text");
const varsUtilities_1 = require("../../varsUtilities");
const PieLegend = ({ data }) => {
    return (react_1.default.createElement(inlines_1.styled.div, { style: { display: 'flex', gap: 20, justifyContent: 'center' } }, data.map((item, idx) => (react_1.default.createElement(inlines_1.styled.div, { style: { display: 'flex', gap: 6, alignItems: 'center' }, key: idx },
        react_1.default.createElement(inlines_1.styled.div, { style: {
                width: 12,
                height: 12,
                borderRadius: 6,
                backgroundColor: (0, varsUtilities_1.color)('nonSemanticBackground', item?.color || (0, varsUtilities_1.colorHash)('nonSemanticBackground', item.label), 'strong'),
            } }),
        react_1.default.createElement(Text_1.Text, { size: 12, weight: "medium", truncate: true }, item.label))))));
};
exports.PieLegend = PieLegend;
//# sourceMappingURL=PieLegend.js.map