import {Alert, Container, Modal} from "@mantine/core";
import React from "react";
import {useTranslation} from "react-i18next";

interface ModalErrorProps {
  show: boolean
  onClose: () => void
}


export default function ModalError({
  show,
  onClose
}: ModalErrorProps) {

  const { t } = useTranslation('feedbackSupport', { useSuspense: false })

  return (
    <Modal
      opened={show}
      onClose={onClose}
      fullScreen={true}
      className={'screenshot-hide'}
      zIndex={10000}
    >
      <Container>
        <Alert color={'red'} title={t('ModalError.title')}>
          {t('ModalError.text')}
        </Alert>
      </Container>
    </Modal>
  )
}