import React from 'react'; import { motion } from 'framer-motion'; import { Check, Package, Upload, BarChart3 } from 'lucide-react'; import { useTranslation } from 'react-i18next'; import clsx from 'clsx'; interface Step { id: number; label: string; icon: React.ElementType; } interface ProgressStepperProps { currentStep: number; } const ProgressStepper: React.FC = ({ currentStep }) => { const { t } = useTranslation(); const steps: Step[] = [ { id: 1, label: t('stepper.selectTier'), icon: Package }, { id: 2, label: t('stepper.uploadData'), icon: Upload }, { id: 3, label: t('stepper.viewResults'), icon: BarChart3 }, ]; return (
{steps.map((step, index) => { const Icon = step.icon; const isCompleted = currentStep > step.id; const isCurrent = currentStep === step.id; const isUpcoming = currentStep < step.id; return ( {/* Step Circle */}
{isCompleted ? ( ) : ( )} {/* Step Label */} {step.label}
{/* Connector Line */} {index < steps.length - 1 && (
step.id ? '100%' : '0%', }} transition={{ duration: 0.5, delay: index * 0.1 }} />
)}
); })}
); }; export default ProgressStepper;