import { AlertTriangle, CircleGauge, TrendingDown, TrendingUp } from 'lucide-react'; import type { DailyMileageReport } from '../api'; function InsightIcon({ tone }: { tone: string }) { if (tone === 'positive') return ; if (tone === 'critical') return ; if (tone === 'warning') return ; return ; } export default function ReportInsights({ insights, }: { insights: DailyMileageReport['insights']; }) { return (
{insights.map(insight => { const toneClass = insight.tone === 'positive' ? 'text-emerald-600 bg-emerald-50' : insight.tone === 'critical' ? 'text-rose-600 bg-rose-50' : insight.tone === 'warning' ? 'text-amber-600 bg-amber-50' : 'text-blue-600 bg-blue-50'; return (
{insight.title}
{insight.detail}
); })}
); }