import React, { useState } from 'react'; import { ChevronDown, ChevronUp, Video } from 'lucide-react'; export default function OutputPanel({ result }) { const [showTranscript, setShowTranscript] = useState(false); if (!result) return null; const confidence = (result.confidence || 0) * 100; const transcriptPreview = result.video_transcript || ''; const getConfidenceColor = (c) => { if (c >= 80) return 'text-emerald-400'; if (c >= 60) return 'text-sky-400'; if (c >= 40) return 'text-amber-400'; return 'text-rose-400'; }; return (
{result.answer}
{result.context_summary}
Safety Warning: {Array.isArray(result.metadata.extraction.safety_warning) ? result.metadata.extraction.safety_warning.join(', ') : result.metadata.extraction.safety_warning}
Processed in {result.compute_time_ms}ms across {result.metadata?.sources_retrieved || 0} sources
)}