import Dashboard from './pages/Dashboard';
import DeviceManagement from './pages/DeviceManagement';
import RealTimeMonitoring from './pages/RealTimeMonitoring';
import OtaManagement from './pages/OtaManagement';
import MqttManagement from './pages/MqttManagement';
import SystemSettings from './pages/SystemSettings';
import Login from './pages/Login';
import type { ReactNode } from 'react';

interface RouteConfig {
  name: string;
  path: string;
  element: ReactNode;
  visible?: boolean;
}

const routes: RouteConfig[] = [
  {
    name: '仪表盘',
    path: '/',
    element: <Dashboard />
  },
  {
    name: '登录',
    path: '/login',
    element: <Login />,
    visible: false
  },
  {
    name: '设备管理',
    path: '/devices',
    element: <DeviceManagement />
  },
  {
    name: '实时监控',
    path: '/monitoring',
    element: <RealTimeMonitoring />
  },
  {
    name: 'OTA管理',
    path: '/ota',
    element: <OtaManagement />
  },
  {
    name: 'MQTT管理',
    path: '/mqtt',
    element: <MqttManagement />
  },
  {
    name: '系统设置',
    path: '/settings',
    element: <SystemSettings />
  }
];

export default routes;