import { Award, Percent, RefreshCw, Target, TrendingDown, CircleCheckBig } from 'lucide-react'; import { Panel } from './components/Panel'; import { StatTile } from './components/StatTile'; import { SavingsTrendChart } from './components/SavingsTrendChart'; import { MarkupTrendChart } from './components/MarkupTrendChart'; import { OutcomeChart } from './components/OutcomeChart'; import { ParticipationChart } from './components/ParticipationChart'; import { TypeSplitChart } from './components/TypeSplitChart'; import { CategoryChart } from './components/CategoryChart'; import { CardEffectChart } from './components/CardEffectChart'; import { CardTop5 } from './components/CardTop5'; import { wonCompact, pct, signedWonCompact } from './fmt'; import { fillMonths } from './months'; import type { StatData } from './types'; import { useLabels } from '@/features/settings/useCompanySettings'; // 통계 본문. KPI 요약 + 절감 분석 + 성사/프로세스 + 카드 효과. scope(회사/내견적)별로 동일 레이아웃. export function StatisticsView({ data }: { data: StatData }) { const label = useLabels(); // 회사 설정 용어(카테고리 등) const k = data.kpi; // 월별 차트는 최근 6개월 축을 고정한다(데이터 없는 달은 0) — 한 점만 찍히던 현상 방지. const trend = fillMonths(data.trend, (month) => ({ month, savings: 0, rate: 0 })); const markupTrend = fillMonths(data.markupTrend, (month) => ({ month, rate: 0 })); return (