"use client" import { ReactNode } from "react" import { cn } from "@/lib/utils" interface WizardStep { number: number title: string description: string } interface WizardContainerProps { children: ReactNode currentStep: number steps: readonly WizardStep[] onStepClick?: (step: number) => void className?: string } function StepIndicator({ currentStep, steps, onStepClick }: { currentStep: number steps: readonly WizardStep[] onStepClick?: (step: number) => void }) { return (
{steps.map((step, index) => { const isCompleted = currentStep > step.number const isCurrent = currentStep === step.number const isClickable = step.number <= currentStep && onStepClick return (
onStepClick(step.number) : undefined} >
{isCompleted ? "✓" : step.number}

{step.title}

{step.description}

{index < steps.length - 1 && (
)}
) })}
) } export function WizardContainer({ children, currentStep, steps, onStepClick, className }: WizardContainerProps) { return (
{children}
) } export type { WizardStep }