import { _ as __assign } from '../tslib.es6-20a2a300.js';
import { jsx, jsxs } from 'react/jsx-runtime';
import { m as makeStyles } from '../makeStyles-c9a99c7a.js';
import { a as createStyles } from '../createStyles-16423e9e.js';
import { b as MuiTableContainer, M as MuiTable, a as MuiTableBody } from '../TableContainer-e3324a72.js';
import { b as MuiTableHead, M as MuiTableRow, a as MuiTableCell } from '../TableRow-b30398d4.js';
import '../defaultTheme-49a26576.js';
import 'react';
import '../clsx.m-6243b874.js';
import '../withStyles-99aeb25b.js';
import '../hoist-non-react-statics.cjs-b718ab87.js';
import '../capitalize-5d3e9aac.js';

/**
 * Utilities
 */
function createCellData(dataSets, cellDataKeys) {
    var cellData = {};
    cellDataKeys.forEach(function (key, index) { return (cellData[key] = dataSets[index]); });
    return cellData;
}
function formatCellDataRowsIntoArray(data) {
    var array = [];
    for (var property in data) {
        array.push(data[property]);
    }
    return array;
}
/**
 * Styles
 */
var useStyles = makeStyles(function (theme) {
    return createStyles({
        root: {
            width: "100%"
        }
    });
});
var TableContainer = function (_a) {
    var headCells = _a.headCells, bodyCellsRows = _a.bodyCellsRows;
    var classes = useStyles();
    return (jsx(MuiTableContainer, __assign({ className: classes.root }, { children: jsxs(MuiTable, __assign({ "aria-labelledby": "tableTitle", "aria-label": "enhanced table" }, { children: [jsx(MuiTableHead, { children: jsx(MuiTableRow, { children: headCells.map(function (cell, cellIndex) { return (jsx(MuiTableCell, __assign({}, cell.props, { children: cell.label }), cellIndex)); }) }, void 0) }, void 0), jsx(MuiTableBody, { children: bodyCellsRows.map(function (rowCells, index) { return (jsx(MuiTableRow, { children: formatCellDataRowsIntoArray(rowCells).map(function (cell, cellIndex) { return (jsx(MuiTableCell, __assign({}, cell.props, { children: cell.content }), cellIndex)); }) }, index)); }) }, void 0)] }), void 0) }), void 0));
};

export { createCellData, TableContainer as default, formatCellDataRowsIntoArray };
