import React, { ChangeEvent } from 'react' import { Mail, ArrowLeft, CheckCircle2, Terminal } from 'lucide-react' import { useTranslation } from '../i18n' import { useForgotPassword } from './forgotPassword/useForgotPassword' const inputBase: React.CSSProperties = { width: '100%', padding: '11px 12px 11px 38px', borderRadius: 12, border: '1px solid #e5e7eb', fontSize: 14, fontFamily: 'inherit', outline: 'none', transition: 'border-color 120ms', background: 'white', color: '#111827', } const ForgotPasswordPage: React.FC = () => { const { t } = useTranslation() // Page = wiring container: form state, the SMTP probe and submit live in the hook. const { navigate, email, setEmail, submitted, isLoading, smtpConfigured, handleSubmit } = useForgotPassword() return (
{submitted ? (

{t('login.forgotPasswordSentTitle')}

{t('login.forgotPasswordSentBody')}

{smtpConfigured === false && (

{t('login.forgotPasswordSmtpHintOff')}

)}
) : ( <>

{t('login.forgotPasswordTitle')}

{t('login.forgotPasswordBody')}

{smtpConfigured === false && (

{t('login.forgotPasswordSmtpHintOff')}

)}
) => setEmail(e.target.value)} required placeholder={t('login.emailPlaceholder')} style={inputBase} onFocus={(e) => { e.currentTarget.style.borderColor = '#111827' }} onBlur={(e) => { e.currentTarget.style.borderColor = '#e5e7eb' }} />
)}
) } export default ForgotPasswordPage