// components/ui/step-indicator.tsx import * as React from 'react'; import { View } from 'react-native'; import { Check } from 'lucide-react-native'; import { Text } from './text'; import { cn } from '@/lib/utils'; import { useThemeColors } from '@/hooks/useThemeColors'; export interface Step { title: string; description?: string; } export interface StepIndicatorProps { steps: Step[]; currentStep: number; orientation?: 'horizontal' | 'vertical'; className?: string; } export function StepIndicator({ steps, currentStep, orientation = 'horizontal', className, }: StepIndicatorProps) { const { colors } = useThemeColors(); const isVertical = orientation === 'vertical'; return ( {steps.map((step, index) => { const isCompleted = index < currentStep; const isActive = index === currentStep; const isLast = index === steps.length - 1; return ( {/* Indicator part (Circle + Line) */} {/* Horizontal Line before */} {!isVertical && ( )} {/* Circle */} {isCompleted ? ( ) : ( {index + 1} )} {/* Horizontal Line after */} {!isVertical && ( )} {/* Vertical Line down (only for vertical) */} {isVertical && !isLast && ( )} {/* Labels */} {step.title} {step.description && ( {step.description} )} ); })} ); }