/**
 * @deprecated Compose using `Dialog` from `@material-hu/components/design-system/Dialog`
 * and `Spinner` from `@material-hu/components/design-system/ProgressIndicators/Spinner`.
 * Note: this component renders only `DialogContent` (no outer Dialog) — consumers already wrap it in a Dialog.
 * Also uses deprecated local `CircularProgress` — that dependency goes away with migration.
 */
import DialogContent from '@material-hu/mui/DialogContent';
import DialogContentText from '@material-hu/mui/DialogContentText';
import Stack from '@material-hu/mui/Stack';
import Typography from '@material-hu/mui/Typography';

import { useLokaliseTranslation } from 'src/utils/i18n';

import CircularProgress from 'src/components/CircularProgress';

type Props = {
  extended?: boolean;
};

function DownloadingModal({ extended = false }: Props) {
  const { t } = useLokaliseTranslation('backoffice_only');
  return (
    <DialogContent>
      <Stack direction="row">
        <CircularProgress centered />
        <Stack sx={{ ml: 4 }}>
          <Typography variant="h6">
            {t('backoffice_only:downloading_modal.downloading')}
          </Typography>
          <DialogContentText sx={{ my: 1 }}>
            {t('backoffice_only:downloading_modal.downloading_info')}
          </DialogContentText>
          {extended && (
            <DialogContentText sx={{ my: 1 }}>
              {t('backoffice_only:downloading_modal.downloading_limit')}
            </DialogContentText>
          )}
        </Stack>
      </Stack>
    </DialogContent>
  );
}

export default DownloadingModal;
