import type { JSX } from "react"
import { getElectiveOverviewStats } from "@/modules/elective/data-access-stats"
import { ElectiveStatsCards } from "@/modules/elective/components/elective-stats-cards"

/**
 * 管理员概览统计卡片 - 异步 RSC loader
 * 独立 Suspense 边界，可流式渲染
 */
export async function StatsCardsLoader(): Promise<JSX.Element> {
  const stats = await getElectiveOverviewStats()
  return <ElectiveStatsCards stats={stats} />
}
