import { Divider, Skeleton } from '@mui/material';
import { Fragment } from 'react/jsx-runtime';

const TableLoader = ({ count }: { count: number }) => {
  return (
    <Fragment>
      <Skeleton variant='rectangular' width={'100%'} height={'13vh'} />
      {Array.from({ length: count }).map((_, index) => (
        <Fragment key={index}>
          <Divider
            sx={{
              marginBottom: '3px',
            }}
          />
          <Skeleton variant='rectangular' width='100%' height='7vh' />
        </Fragment>
      ))}
    </Fragment>
  );
};

export default TableLoader;
