import { Box, Paper, Typography, Skeleton } from '@mui/material'
import { AlertTriangle, Calendar, CalendarDays, Eye } from 'lucide-react'
import { useReminderInsights } from '../../hooks/useReminders'
interface KpiItemProps {
icon: React.ReactNode
label: string
value: number | string
color: string
}
function KpiItem({ icon, label, value, color }: KpiItemProps) {
return (
{icon}
{value}
{label}
)
}
export function ReminderKpiBar() {
const { data, isLoading } = useReminderInsights()
if (isLoading) {
return (
{[1, 2, 3, 4].map(i => (
))}
)
}
const insights = data ?? { urgentCount: 0, dueThisWeek: 0, dueThisMonth: 0, schattenmarktReadyCount: 0 }
return (
}
label="Dringend"
value={insights.urgentCount}
color="#dc2626"
/>
}
label="Diese Woche"
value={insights.dueThisWeek}
color="#ea580c"
/>
}
label="Dieser Monat"
value={insights.dueThisMonth}
color="#0369a1"
/>
}
label="Schattenmarkt-Risiko"
value={insights.schattenmarktReadyCount}
color="#be185d"
/>
)
}