import { Link } from '@/i18n/navigation'; import { Card } from '@/components/ui/shared/Card'; import type { KpiCardColor } from '@/components/today/widget-registry'; import type { LucideIcon } from 'lucide-react'; const colorClasses: Record = { blue: '!bg-purpose-visit-bg !text-purpose-visit-fg !border-purpose-visit-border', yellow: '!bg-badge-warning-bg !text-badge-warning-fg !border-badge-warning-border', green: '!bg-badge-success-bg !text-badge-success-fg !border-badge-success-border', red: '!bg-badge-danger-bg !text-badge-danger-fg !border-badge-danger-border', purple: '!bg-purpose-consultation-bg !text-purpose-consultation-fg !border-purpose-consultation-border', default: '', }; interface KpiCardProps { title: string; value: string; subtitle?: string | null; icon?: LucideIcon; color?: KpiCardColor; loading?: boolean; href?: string; } export function KpiCard({ title, value, subtitle, icon: Icon, color = 'default', loading = false, href, }: KpiCardProps) { const card = (

{title}

{Icon ? : null}
{loading ? (
) : (

{value}

)} {subtitle ? (

{subtitle}

) : null} ); if (href && !loading) { return ( {card} ); } return card; }