import { Box, Card, Group, Text, ThemeIcon, useMantineColorScheme, } from "@mantine/core"; import type { ReactNode } from "react"; interface StatCardProps { title: string; value: string | number; detail?: string; trend?: string; trendValue?: number; icon: ReactNode; iconColor?: string; } export function StatCard({ title, value, detail, trend, trendValue, icon, iconColor = "#1E3A5F", }: StatCardProps) { const { colorScheme } = useMantineColorScheme(); const dark = colorScheme === "dark"; const isPositiveTrend = trendValue ? trendValue >= 0 : true; return ( {title} {value} {detail && ( {detail} )} {trend && ( {trend} )} {icon} ); }