/** * SchoolRow Component * Compact row-based school display for search results list view */ import type { School } from '@/lib/types'; import { formatPercentage, formatProgress, calculateTrend } from '@/lib/utils'; import { progressBand } from '@/lib/metrics'; import styles from './SchoolRow.module.css'; interface SchoolRowProps { school: School; isLocationSearch?: boolean; isInCompare?: boolean; onAddToCompare?: (school: School) => void; onRemoveFromCompare?: (urn: number) => void; } export function SchoolRow({ school, isLocationSearch, isInCompare = false, onAddToCompare, onRemoveFromCompare, }: SchoolRowProps) { const trend = calculateTrend(school.rwm_expected_pct, school.prev_rwm_expected_pct); const hasProgress = school.reading_progress != null || school.writing_progress != null || school.maths_progress != null; const handleCompareClick = () => { if (isInCompare) { onRemoveFromCompare?.(school.urn); } else { onAddToCompare?.(school); } }; return (