import { Card, Group, Text, ThemeIcon, Stack, Progress, Badge } from '@mantine/core' import { IconType } from 'react-icons' import { TbTrendingUp, TbTrendingDown } from 'react-icons/tb' interface SummaryCardProps { title: string value: string | number icon: IconType color?: string trend?: { value: string positive: boolean } progress?: { value: number label: string } isError?: boolean } export function SummaryCard({ title, value, icon: Icon, color = 'brand-blue', trend, progress, isError }: SummaryCardProps) { return ( ({ root: { backgroundColor: isError && Number(value) > 0 ? 'rgba(239, 68, 68, 0.05)' : 'rgba(30, 41, 59, 0.4)', borderColor: isError && Number(value) > 10 ? 'rgba(239, 68, 68, 0.3)' : 'rgba(255, 255, 255, 0.08)', transition: 'transform 0.2s ease', '&:hover': { transform: 'translateY(-4px)', } } })} > {trend && ( : } > {trend.value} )} {title.toUpperCase()} {value} {progress && ( {progress.label} {progress.value}% )} ) } import { Box } from '@mantine/core'