"use client" import { cn } from "@/lib/utils" import { Check } from "lucide-react" export interface Step { id: number title: string subtitle?: string description?: string } export interface StepIndicatorProps { steps: Step[] currentStep: number variant?: "default" | "circle" | "numbered" | "minimal" orientation?: "horizontal" | "vertical" onStepClick?: (stepId: number) => void className?: string showProgress?: boolean } /** * 统一的步骤指示器组件 * * @param steps 步骤数组 * @param currentStep 当前步骤 * @param variant 样式变体 * @param orientation 方向 * @param onStepClick 步骤点击回调 * @param className 自定义类名 * @param showProgress 是否显示进度条 */ export function StepIndicator({ steps, currentStep, variant = "default", orientation = "horizontal", onStepClick, className, showProgress = true, }: StepIndicatorProps) { // 计算进度百分比 const progressPercentage = steps.length > 1 ? ((currentStep - 1) / (steps.length - 1)) * 100 : 0 // 根据变体渲染不同样式的步骤指示器 if (variant === "circle") { return (