import React from 'react';
import { Box, Grid } from '@material-ui/core';
import { MuiVegaLite } from '@material-vega/material-ui';
import { useReadMetaData } from '../hooks/useReadMetaData';
export const DonutWrapper = props => {
    const { propsComponent } = props;
    const { id, columnSize, values, encoding, x, y, xfield, yfield } = useReadMetaData(propsComponent);
    return (React.createElement(Grid, { item: true, xs: columnSize === null || columnSize === void 0 ? void 0 : columnSize.xs, sm: columnSize === null || columnSize === void 0 ? void 0 : columnSize.sm, md: columnSize === null || columnSize === void 0 ? void 0 : columnSize.md, key: id }, React.createElement(Box, { mt: 2, clone: true, overflow: "hidden", sx: { width: '100%', minWidth: '100%' } }, React.createElement(MuiVegaLite, { variant: "verticalBarChart", color: "secondary", background: "paper", autoResize: true, actions: false, spec: {
            $schema: 'https://vega.github.io/schema/vega-lite/v5.json',
            description: 'A simple donut chart with embedded data.',
            data: {
                values: values,
                // values: [
                //   { category: 1, value: 4 },
                //   { category: 2, value: 6 },
                //   { category: 3, value: 10 },
                //   { category: 4, value: 3 },
                //   { category: 5, value: 7 },
                //   { category: 6, value: 8 },
                // ],
            },
            mark: { type: 'arc', innerRadius: 160 },
            width: 350,
            height: 350,
            encoding: {
                theta: { field: 'value', type: 'quantitative' },
                color: { field: 'category', type: 'nominal' },
            },
        } }))));
};
export const barChartWrapperProps = [
    {
        structure: [
            { label: 'Data1', value: 0 },
            { label: 'Data2', value: 1 },
            { label: 'Data3', value: 0 },
            { label: 'Data4', value: 1 },
        ],
    },
];
//# sourceMappingURL=DonutWrapper.js.map