import React from 'react';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import App from './App';
import Dashboard from './pages/Dashboard';
import CameraManagement from './pages/CameraManagement';
import ROIEditor from './pages/ROIEditor';
import AlertCenter from './pages/AlertCenter';

const Settings: React.FC = () => (
  <div>
    <h2>系统设置</h2>
    <p>配置管理页面开发中...</p>
  </div>
);

const AppWrapper: React.FC = () => {
  return (
    <BrowserRouter>
      <App>
        <Routes>
          <Route path="/" element={<Dashboard />} />
          <Route path="/cameras" element={<CameraManagement />} />
          <Route path="/rois" element={<ROIEditor />} />
          <Route path="/alerts" element={<AlertCenter />} />
          <Route path="/settings" element={<Settings />} />
        </Routes>
      </App>
    </BrowserRouter>
  );
};

export default AppWrapper;
