'use client'; import { motion, useReducedMotion, AnimatePresence } from 'framer-motion'; import { useEffect, useState } from 'react'; import { UserPlus, Link as LinkIcon, Settings, Trophy, Car, CheckCircle2, LucideIcon } from 'lucide-react'; import { Box } from '@/ui/Box'; import { Stack } from '@/ui/Stack'; import { Text } from '@/ui/Text'; import { Icon } from '@/ui/Icon'; import { Surface } from '@/ui/Surface'; interface WorkflowStep { id: number; icon: LucideIcon; title: string; description: string; color: string; } const WORKFLOW_STEPS: WorkflowStep[] = [ { id: 1, icon: UserPlus, title: 'Create Account', description: 'Sign up with email or connect iRacing', color: 'text-primary-blue', }, { id: 2, icon: LinkIcon, title: 'Link iRacing', description: 'Connect your iRacing profile for stats', color: 'text-purple-400', }, { id: 3, icon: Settings, title: 'Configure Profile', description: 'Set up your racing preferences', color: 'text-warning-amber', }, { id: 4, icon: Trophy, title: 'Join Leagues', description: 'Find and join competitive leagues', color: 'text-performance-green', }, { id: 5, icon: Car, title: 'Start Racing', description: 'Compete and track your progress', color: 'text-primary-blue', }, ]; export function AuthWorkflowMockup() { const shouldReduceMotion = useReducedMotion(); const [isMounted, setIsMounted] = useState(false); const [activeStep, setActiveStep] = useState(0); useEffect(() => { setIsMounted(true); }, []); useEffect(() => { if (!isMounted) return; const interval = setInterval(() => { setActiveStep((prev) => (prev + 1) % WORKFLOW_STEPS.length); }, 3000); return () => clearInterval(interval); }, [isMounted]); if (!isMounted) { return ( {WORKFLOW_STEPS.map((step) => ( {step.title} ))} ); } return ( {/* Connection Lines */} {/* Steps */} {WORKFLOW_STEPS.map((step, index) => { const isActive = index === activeStep; const isCompleted = index < activeStep; const StepIcon = step.icon; return ( setActiveStep(index)} whileHover={{ scale: 1.05 }} whileTap={{ scale: 0.95 }} > {isCompleted ? ( ) : ( )} ); })} {/* Active Step Preview - Mobile */} Step {activeStep + 1}: {WORKFLOW_STEPS[activeStep]?.title || ''} {WORKFLOW_STEPS[activeStep]?.description || ''} ); }