import { Brain, Eye, Scan, Shield } from 'lucide-react'; import { Card } from './ui/card'; import { Progress } from './ui/progress'; import { useEffect, useState } from 'react'; export function AnalyzingAnimation() { const [progress, setProgress] = useState(0); const [currentStep, setCurrentStep] = useState(0); const steps = [ { icon: Scan, label: 'Scanning UI elements...', progress: 25 }, { icon: Eye, label: 'Detecting visual patterns...', progress: 50 }, { icon: Brain, label: 'Running XAI analysis...', progress: 75 }, { icon: Shield, label: 'Checking CFPB compliance...', progress: 100 }, ]; useEffect(() => { const interval = setInterval(() => { setProgress((prev) => { if (prev >= 100) return 100; return prev + 2; }); }, 50); return () => clearInterval(interval); }, []); useEffect(() => { const stepIndex = Math.floor(progress / 25); setCurrentStep(Math.min(stepIndex, steps.length - 1)); }, [progress]); const CurrentIcon = steps[currentStep].icon; return (
{/* Animated Icon */}
{/* Current Step */}

Analyzing UI for Dark Patterns

{steps[currentStep].label}

{/* Progress Bar */}
Processing... {progress}%
{/* Step Indicators */}
{steps.map((step, index) => { const StepIcon = step.icon; const isActive = index === currentStep; const isCompleted = progress >= step.progress; return (
); })}

Using Vision Transformer (ViT) and Explainable AI to detect psychological manipulation patterns in accordance with CFPB guidelines

); }