import { useState } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; import { Icon } from '../shared/Icon'; import { useStakeholderFilter } from '../../hooks/useStakeholderFilter'; import { ERROR_CODES } from '../../data/referenceData'; const SEVERITY_COLORS = { info: { text: '#60a5fa', bg: 'rgba(96,165,250,0.1)', border: 'rgba(96,165,250,0.2)' }, warn: { text: '#fbbf24', bg: 'rgba(251,191,36,0.1)', border: 'rgba(251,191,36,0.2)' }, critical: { text: '#f87171', bg: 'rgba(248,113,113,0.1)', border: 'rgba(248,113,113,0.2)' }, }; export function TroubleshootingSection() { const errors = useStakeholderFilter(ERROR_CODES); const [expandedCode, setExpandedCode] = useState(null); if (errors.length === 0) return null; return (

Troubleshooting & Error Codes

{errors.map((error) => { const isExpanded = expandedCode === error.code; const colors = SEVERITY_COLORS[error.severity]; return (
{isExpanded && (
Cause

{error.cause}

Resolution

{error.resolution}

)}
); })}
); }