'use client'; import { MessageSquare, AlertTriangle, ThumbsUp, ThumbsDown, Star, Target, Layers, TrendingUp, } from 'lucide-react'; import { KPICard } from './KPICard'; import type { OverviewStats, Sentiment } from '../types'; import { useReviewIQFilters } from '@/contexts/ReviewIQFilterContext'; interface KPISectionProps { overview: OverviewStats; } /** * KPI cards section showing overview statistics. * Cards are clickable to filter the dashboard. */ export function KPISection({ overview }: KPISectionProps) { const { filters, toggleSentiment } = useReviewIQFilters(); const positiveActive = filters.sentiment.includes('positive'); const negativeActive = filters.sentiment.includes('negative'); const totalSentiment = overview.positive_count + overview.negative_count + overview.neutral_count + overview.mixed_count; const positivePercent = totalSentiment > 0 ? ((overview.positive_count / totalSentiment) * 100).toFixed(0) : '0'; const negativePercent = totalSentiment > 0 ? ((overview.negative_count / totalSentiment) * 100).toFixed(0) : '0'; return (