"use client" import { motion } from "motion/react" import { Check, Info } from "lucide-react" import { useState } from "react" interface Step { label: string tooltip: string } interface StepIndicatorProps { steps: Step[] currentStep: number onStepClick?: (step: number) => void } export function StepIndicator({ steps, currentStep, onStepClick, }: StepIndicatorProps) { const [showTooltip, setShowTooltip] = useState(null) return (
{/* Desktop: horizontal steps */}
{steps.map((step, index) => { const isCompleted = index < currentStep const isCurrent = index === currentStep const isClickable = index <= currentStep return (
{/* Step circle with tooltip */}
{/* Tooltip */} {showTooltip === index && (

{step.label}

{step.tooltip}

)}
{/* Step label */} {step.label} {/* Connector line */} {index < steps.length - 1 && (
)}
) })}
{/* Mobile: compact step indicator */}
Step {currentStep + 1} of {steps.length}
{showTooltip === currentStep && (

{steps[currentStep].label}

{steps[currentStep].tooltip}

)}
{/* Mobile: step dots */}
{steps.map((_, index) => (
) }