import { FC } from 'react';

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

type Props = {
  rows: number;
  columns: number;
};

export const FileTableSkeleton: FC<Props> = ({ rows, columns }) => {
  return (
    <>
      {Array.from({ length: rows }, (_, index) => (
        <HuTableRow key={index}>
          {Array.from({ length: columns }).map((__, i) => (
            <HuTableCell key={i}>
              <HuSkeleton
                width={100}
                height={33}
              />
            </HuTableCell>
          ))}
        </HuTableRow>
      ))}
    </>
  );
};

export default FileTableSkeleton;
