'use client'; import { motion, useReducedMotion } from 'framer-motion'; import { useState, useEffect } from 'react'; import { Box } from '@/ui/Box'; import { Text } from '@/ui/Text'; export function ProtestWorkflowMockup() { const shouldReduceMotion = useReducedMotion(); const [activeStep, setActiveStep] = useState(1); const [isMobile, setIsMobile] = useState(false); useEffect(() => { const checkMobile = () => setIsMobile(window.innerWidth < 768); checkMobile(); window.addEventListener('resize', checkMobile); return () => window.removeEventListener('resize', checkMobile); }, []); const steps = [ { name: 'Submit', status: 'pending', color: 'charcoal-outline', icon: 'M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z' }, { name: 'Review', status: 'active', color: 'warning-amber', icon: 'M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4' }, { name: 'Resolve', status: 'resolved', color: 'performance-green', icon: 'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z' }, ]; const getStatusColor = (status: string) => { switch (status) { case 'pending': return 'bg-charcoal-outline border-charcoal-outline text-gray-500'; case 'active': return 'bg-warning-amber/20 border-warning-amber text-warning-amber'; case 'resolved': return 'bg-performance-green/20 border-performance-green text-performance-green'; default: return 'bg-charcoal-outline border-charcoal-outline text-gray-500'; } }; if (isMobile) { return ( {steps.map((step, i) => ( {/* eslint-disable-next-line gridpilot-rules/component-classification */} {step.name} {i < steps.length - 1 && ( {/* eslint-disable-next-line gridpilot-rules/component-classification */} )} ))} ); } const stepVariants = { hidden: { opacity: 0, scale: shouldReduceMotion ? 1 : 0.8 }, visible: (i: number) => ({ opacity: 1, scale: 1, transition: { delay: shouldReduceMotion ? 0 : i * 0.2, type: 'spring' as const, stiffness: 200, damping: 20 } }) }; return ( {steps.map((step, i) => ( !shouldReduceMotion && setActiveStep(i)} > {/* eslint-disable-next-line gridpilot-rules/component-classification */} {step.status === 'active' && ( )} {step.name} {i < steps.length - 1 && ( {/* eslint-disable-next-line gridpilot-rules/component-classification */} )} ))} ); }