import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
import Login from './pages/Login';
import Dashboard from './pages/Dashboard';
import ReportEditor from './pages/ReportEditor';
import ReportManage from './pages/ReportManage';
import ReportView from './pages/ReportView';
import TemplateManage from './pages/TemplateManage';
import UserManage from './pages/UserManage';
import SystemSettings from './pages/SystemSettings';

export default function App() {
  return (
    <Router>
      <Routes>
        <Route path="/" element={<Login />} />
        <Route path="/dashboard" element={<Dashboard />} />
        <Route path="/report-editor" element={<ReportEditor />} />
        <Route path="/report-manage" element={<ReportManage />} />
        <Route path="/report-view/:id" element={<ReportView />} />
        <Route path="/template-manage" element={<TemplateManage />} />
        <Route path="/user-manage" element={<UserManage />} />
        <Route path="/system-settings" element={<SystemSettings />} />
        <Route path="*" element={<Navigate to="/" replace />} />
      </Routes>
    </Router>
  );
}
