/* eslint-disable react/require-default-props */
import { Box, CircularProgress } from '@mui/material';
import PropTypes from 'prop-types';

// HACK: 默认的 size 是精心调整过的，不要随意更改
export default function Loading({ size = 92.5, loadingSize = 30 }) {
  return (
    <Box
      sx={{
        height: '100%',
        minWidth: size,
        minHeight: size,
        display: 'flex',
        justifyContent: 'center',
        alignItems: 'center',
      }}>
      <CircularProgress size={loadingSize} sx={{ color: 'secondary.main' }} />
    </Box>
  );
}

Loading.propTypes = {
  size: PropTypes.number,
  loadingSize: PropTypes.number,
};
