import { Card, CardContent, Box, Typography, Avatar, Stack } from '@mui/material'; import ArrowUpwardRoundedIcon from '@mui/icons-material/ArrowUpwardRounded'; import ArrowDownwardRoundedIcon from '@mui/icons-material/ArrowDownwardRounded'; // ==============================|| STAT / KPI CARD ||============================== // export default function StatCard({ title, value, icon: Icon, color = 'primary', trend, caption }) { const trendUp = typeof trend === 'number' ? trend >= 0 : null; return ( {title} {value} {Icon && ( )} {(trendUp !== null || caption) && ( {trendUp !== null && ( <> {trendUp ? ( ) : ( )} {Math.abs(trend)}% )} {caption && ( {caption} )} )} ); }