import { useState } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; import type { Lang } from '@/lib/translations'; import { content } from '@/lib/translations'; import { ProgressBar } from '@/components/ProgressBar'; import { ApplicationForm, type FormData } from '@/components/ApplicationForm'; import { PaymentStep } from '@/components/PaymentStep'; const pageVariants = { enter: { opacity: 0, x: 10 }, center: { opacity: 1, x: 0 }, exit: { opacity: 0, x: -10 }, }; const Index = () => { const [lang, setLang] = useState('en'); const [step, setStep] = useState(1); const [_formData, setFormData] = useState(null); const t = content[lang]; const handleFormSubmit = (data: FormData) => { setFormData(data); setStep(2); window.scrollTo({ top: 0, behavior: 'smooth' }); }; const stepLabel = step === 1 ? t.identity : t.pay.split('&')[0].trim(); return (
{step === 1 ? ( ) : ( setStep(1)} /> )}
); }; export default Index;