import Skeleton from '@material-hu/components/design-system/Skeleton';
import TableCell from '@material-hu/components/design-system/Table/components/TableCell';
import TableRow from '@material-hu/components/design-system/Table/components/TableRow';

export const TableSkeleton = ({
  rows,
  cols,
}: {
  rows: number;
  cols: number;
}) => {
  return (
    <>
      {Array.from({ length: rows }).map((_, index) => (
        <TableRow
          key={index}
          sx={{ height: 74 }}
        >
          {Array.from({ length: cols }).map((__, idx) => (
            <TableCell key={idx}>
              <Skeleton
                variant="rounded"
                height={32}
              />
            </TableCell>
          ))}
        </TableRow>
      ))}
    </>
  );
};
