import React from 'react' import { Link } from 'react-router-dom' import { useTranslation } from '../i18n' import { Map, Eye, EyeOff, Mail, Lock, User } from 'lucide-react' import { useRegister } from './register/useRegister' export default function RegisterPage(): React.ReactElement { const { t } = useTranslation() // Page = wiring container: form state, validation + register flow live in the hook. const { username, setUsername, email, setEmail, password, setPassword, confirmPassword, setConfirmPassword, showPassword, setShowPassword, isLoading, error, handleSubmit, } = useRegister() return (
{/* Left panel */}

{t('register.getStarted')}

{t('register.subtitle')}

{[ `✓ ${t('register.feature1')}`, `✓ ${t('register.feature2')}`, `✓ ${t('register.feature3')}`, `✓ ${t('register.feature4')}`, `✓ ${t('register.feature5')}`, `✓ ${t('register.feature6')}`, ].map(item => (

{item}

))}
{/* Right panel */}
TREK

{t('register.createAccount')}

{t('register.startPlanning')}

{error && (
{error}
)}
) => setUsername(e.target.value)} required placeholder="johndoe" minLength={3} className="w-full pl-10 pr-4 py-2.5 border border-slate-300 rounded-lg text-slate-900 placeholder-slate-400 focus:ring-2 focus:ring-slate-400 focus:border-transparent transition-[border-color,box-shadow] duration-150 ease-[cubic-bezier(0.23,1,0.32,1)]" />
) => setEmail(e.target.value)} required placeholder="your@email.com" className="w-full pl-10 pr-4 py-2.5 border border-slate-300 rounded-lg text-slate-900 placeholder-slate-400 focus:ring-2 focus:ring-slate-400 focus:border-transparent transition-[border-color,box-shadow] duration-150 ease-[cubic-bezier(0.23,1,0.32,1)]" />
) => setPassword(e.target.value)} required placeholder={t('register.minChars')} className="w-full pl-10 pr-12 py-2.5 border border-slate-300 rounded-lg text-slate-900 placeholder-slate-400 focus:ring-2 focus:ring-slate-400 focus:border-transparent transition-[border-color,box-shadow] duration-150 ease-[cubic-bezier(0.23,1,0.32,1)]" />
) => setConfirmPassword(e.target.value)} required placeholder={t('register.repeatPassword')} className="w-full pl-10 pr-4 py-2.5 border border-slate-300 rounded-lg text-slate-900 placeholder-slate-400 focus:ring-2 focus:ring-slate-400 focus:border-transparent transition-[border-color,box-shadow] duration-150 ease-[cubic-bezier(0.23,1,0.32,1)]" />

{t('register.hasAccount')}{' '} {t('register.signIn')}

) }