'use client'; import React from 'react'; import GaugeCard from './GaugeCard'; import RiskCard from './RiskCard'; import { GraphInsightsPayload, AssessmentResult, TopBusinessRule } from '../types'; export default function SummaryCards({ graphInsights, assessmentResult, topBusinessForGenre }: { graphInsights: GraphInsightsPayload; assessmentResult: AssessmentResult; topBusinessForGenre: (genre: string) => TopBusinessRule[]; }) { const uiTech = graphInsights?.uiSummary?.technical || {}; const techPct = Math.round(Number(uiTech?.percent ?? 0)); const techLabel = uiTech?.label || 'EVIDENCE'; const techTop = uiTech?.top_movers && uiTech.top_movers.length > 0 ? uiTech.top_movers : topBusinessForGenre('Technical'); const uiRisk = graphInsights?.uiSummary?.risk || {}; const riskPctGood = Math.round(Number(uiRisk?.percent_good ?? 0)); const riskLabel = uiRisk?.label || 'RISK'; const riskTop = uiRisk?.top_movers && uiRisk.top_movers.length > 0 ? uiRisk.top_movers : topBusinessForGenre('Risk'); // AI section removed per requirements return (
({ label: (t as any)?.label, uid: (t as any)?.uid }))} topMoversTitle={'Top Score Movers'} /> ({ label: (t as any)?.label, uid: (t as any)?.uid }))} topMoversTitle={'Top Score Movers'} tooltipText={'Higher bar filled indicates lower overall risk; movement to the right reflects improved risk posture.'} /> {/* AI card removed */}
); }