import { CheckCircle2 } from 'lucide-react'; import { useTranslation } from '../../i18n'; import { AppAuthScreen, Field, Notice } from '../login/AppAuthScreen'; import type { useForgotPassword } from './useForgotPassword'; export default function AppForgotPassword({ forgot }: { forgot: ReturnType }) { const { t } = useTranslation(); const back = () => void forgot.navigate('/login'); const smtpOff = forgot.smtpConfigured === false; const smtpNotice = smtpOff && {t('login.forgotPasswordSmtpHintOff')}; return ( {forgot.submitted && !forgot.deliveryIssue ? (
{!smtpOff &&
{smtpNotice}
) : ( <>
void forgot.handleSubmit(event)}>

{t('login.forgotPasswordTitle')}

{t('login.forgotPasswordBody')}

{smtpNotice} {forgot.deliveryIssue && ( {t(forgot.deliveryIssue === 'rateLimit' ? 'common.tooManyAttempts' : 'native.connect.errorUnreachable')} )} forgot.setEmail(event.target.value)} placeholder={t('login.emailPlaceholder')} required /> )}
); }