import { useState } from 'react'; import { Upload, Image as ImageIcon, Loader2, Shield } from 'lucide-react'; import { Button } from './ui/button'; import { Card } from './ui/card'; interface UploadSectionProps { onAnalyze: (imageUrl: string) => void; isAnalyzing: boolean; } const SAMPLE_IMAGES = [ { id: '1', name: 'Urgency & Scarcity Checkout', url: 'https://images.unsplash.com/photo-1563986768609-322da13575f3?w=800&q=80', description: 'Fintech checkout containing countdown timers and artificial item availability notifications.' }, { id: '2', name: 'Pre-Selected Fees Flow', url: 'https://images.unsplash.com/photo-1551288049-bebda4e38f71?w=800&q=80', description: 'Trading account registration featuring pre-checked subscription add-ons and sneaking costs.' }, { id: '3', name: 'Misdirecting Options Confirm', url: 'https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=800&q=80', description: 'Subscription cancellation modal using guilt-inducing confirmshaming copywriting.' } ]; export function UploadSection({ onAnalyze, isAnalyzing }: UploadSectionProps) { const [selectedSample, setSelectedSample] = useState(null); const [uploadedImage, setUploadedImage] = useState(null); const handleFileUpload = (event: React.ChangeEvent) => { const file = event.target.files?.[0]; if (file) { const reader = new FileReader(); reader.onload = (e) => { const result = e.target?.result as string; setUploadedImage(result); setSelectedSample(null); }; reader.readAsDataURL(file); } }; const handleSampleSelect = (url: string) => { setSelectedSample(url); setUploadedImage(null); }; const handleAnalyze = () => { const imageUrl = uploadedImage || selectedSample; if (imageUrl) { onAnalyze(imageUrl); } }; const activeImage = uploadedImage || selectedSample; return (
{/* Glow overlay */}

Audit New UI Interface

{/* Upload Area (Fits target image directly inside) */}
{/* Sample Images */}

Select Fintech Sample Screen

{SAMPLE_IMAGES.map((sample) => ( ))}
{/* Analyze Button */}
); }