import { Smile, Frown, Zap, Clock, CheckCircle } from 'lucide-react'; import type { SentimentResult } from '../types'; import { formatConfidence, formatProcessingTime, getConfidenceLevel, truncateText } from '../utils/formatters'; interface ResultCardProps { result: SentimentResult; } const ResultCard = ({ result }: ResultCardProps) => { const isPositive = result.sentiment === 'POSITIVE'; const confidencePercent = result.confidence * 100; return (
{/* Main Result */}
{isPositive ? ( ) : ( )}
{result.sentiment}

{getConfidenceLevel(result.confidence)}

{/* Confidence Bar */}
Confidence {formatConfidence(result.confidence)}
{/* Metadata */}
{result.cached ? ( ) : ( )} {result.cached ? ( Cached ({formatProcessingTime(result.processing_time_ms)}) ) : ( Processed ({formatProcessingTime(result.processing_time_ms)}) )}
{truncateText(result.text, 50)}
); }; export default ResultCard;