import { CheckCircle2 } from 'lucide-react' interface StepIndicatorProps { step: number // current step (1-based) total: number labels: string[] } export default function StepIndicator({ step, total, labels }: StepIndicatorProps) { return ( <> {/* Mobile: simple text */}
Step {step} of {total} {labels[step - 1] ? ` — ${labels[step - 1]}` : ''}
{/* Desktop: full step bar */}
{Array.from({ length: total }, (_, i) => { const num = i + 1 const isCompleted = num < step const isActive = num === step const isFuture = num > step return (
{/* Step circle + label */}
{isCompleted ? : num}
{labels[i] ?? `Step ${num}`}
{/* Connector line (not after last step) */} {num < total && (
)}
) })}
) }