import { AlertTriangle, CheckCircle2, ShieldCheck, XCircle } from 'lucide-react' import { useState } from 'react' import type { Design, Issue } from '../types/pcb' import { EmptyNote } from './ui' interface Props { design: Design selectedIssue: Issue | null onSelectIssue: (i: Issue) => void } export function ValidationPanel({ design, selectedIssue, onSelectIssue }: Props) { const v = design.validation const [sev, setSev] = useState<'all' | 'error' | 'warning'>('all') if (!v) return } title="Not checked yet">The DRC runs automatically once the board is generated or imported. const issues = v.issues.filter((i) => i.severity !== 'info' && (sev === 'all' || i.severity === sev)) return (
DRC results {v.errors ? 'FAIL' : v.warnings ? 'PASS with warnings' : 'PASS'}
Issues {(['all', 'error', 'warning'] as const).map((s) => ( ))}
) }