import type { InsightCard as InsightCardData } from '@ftb/shared'; export function InsightCard({ insight }: { insight: InsightCardData }) { return (
{insight.primaryValue && (
{insight.primaryValue.value} {insight.primaryValue.unit ?? ''}
{insight.primaryValue.label}
)}

{insight.summary}

{(insight.semanticConfidence !== 'high' || insight.dataConfidence !== 'sufficient') && (

语义置信:{confidenceLabel(insight.semanticConfidence)} · 数据充分性:{dataLabel(insight.dataConfidence)}

)}
); } function confidenceLabel(value: InsightCardData['semanticConfidence']) { return value === 'high' ? '高' : value === 'medium' ? '中' : '低'; } function dataLabel(value: InsightCardData['dataConfidence']) { return value === 'sufficient' ? '数据充分' : value === 'partial' ? '部分数据' : '数据不足'; }