"use client" import { CheckIcon } from "lucide-react" import { cn } from "@/app/lib/utils" interface Step { id: string name: string description?: string } interface StepIndicatorProps { steps: Step[] currentStep: number onStepClick?: (index: number) => void } export function StepIndicator({ steps, currentStep, onStepClick }: StepIndicatorProps) { return (
    {steps.map((step, index) => { const isCompleted = index < currentStep const isCurrent = index === currentStep const isClickable = onStepClick && index <= currentStep return (
  1. isClickable && onStepClick(index)} > {isCompleted ? : index + 1}

    {step.name}

    {step.description && (

    {step.description}

    )}
    {index !== steps.length - 1 && (
    )}
  2. ) })}
) }