import DeveloperBoardOutlined from "@mui/icons-material/DeveloperBoardOutlined";
import DnsOutlined from "@mui/icons-material/DnsOutlined";
import StorageOutlined from "@mui/icons-material/StorageOutlined";
import { KpiCard } from "@/shared/ui/KpiCard.jsx";

export function DashboardStats({ overview, stats }) {
  return (
    <section className="kpi-grid" aria-label="系统指标">
      <KpiCard icon={DnsOutlined} label="后台用户" value={overview?.usersTotal || 0} unit="个" sub={<span className="status-ok">启用 {stats.activeUsers}</span>} />
      <KpiCard icon={DeveloperBoardOutlined} label="角色数量" value={stats.rolesTotal} unit="个" sub={`菜单 ${stats.menuTotal}`} />
      <KpiCard icon={StorageOutlined} label="今日操作" value={stats.logsToday} unit="条" tone="info" sub="操作日志" />
    </section>
  );
}
