import { CheckCircle2, Loader2 } from "lucide-react"; const STEPS = [ { id: 1, label: "Template" }, { id: 2, label: "Recipient" }, { id: 3, label: "Generate" }, { id: 4, label: "Review" }, { id: 5, label: "Sent" }, ]; export default function StepIndicator({ currentStep, loading }) { return (
{STEPS.map((step, i) => { const isActive = step.id === currentStep; const isDone = step.id < currentStep; const isLoading = isActive && loading; return (
{isDone ? ( ) : isLoading ? ( ) : ( {step.id} )} {step.label}
{i < STEPS.length - 1 && (
)}
); })}
); }