import {useTranslation} from 'react-i18next';
import {Dialog, Typography} from '@components';

interface Props {
  isVisible: boolean;
  onClose: () => void;
}

function CancelledDialog({isVisible, onClose}: Props) {
  const {t} = useTranslation();

  return (
    <Dialog
      footer={{
        primaryButton: {
          onPress: onClose,
          text: t('general.back'),
        },
      }}
      isVisible={isVisible}
      onClose={onClose}
      onGoBack={onClose}
      title={t('time_tracker.overtime_request_detail.request_status')}
      withBackButton
      withCloseButton={false}>
      <Typography>
        {t(
          'time_tracker.overtime_request_detail.request_status_cancelled_info',
        )}
      </Typography>
    </Dialog>
  );
}

export default CancelledDialog;
