/**
 * 管理后台面板区 - 按 AdminShell 的 Tab 状态切换渲染 6 个面板
 */
'use client';

import { useAdminTab } from './AdminShell';
import { ModelsPanel } from './panels/ModelsPanel';
import { OrdersPanel } from './panels/OrdersPanel';
import { OverviewPanel } from './panels/OverviewPanel';
import { DashboardPanel } from './panels/DashboardPanel';
import { QuotasPanel } from './panels/QuotasPanel';
import { SettingsPanel } from './panels/SettingsPanel';
import { UsersPanel } from './panels/UsersPanel';

export function AdminPanels() {
  const { tab } = useAdminTab();

  switch (tab) {
    case 'dashboard':
      return <DashboardPanel />;
    case 'users':
      return <UsersPanel />;
    case 'models':
      return <ModelsPanel />;
    case 'orders':
      return <OrdersPanel />;
    case 'quotas':
      return <QuotasPanel />;
    case 'settings':
      return <SettingsPanel />;
    case 'overview':
    default:
      return <OverviewPanel />;
  }
}
