import React from 'react';
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
import { ConfigProvider } from 'antd';
import zhCN from 'antd/locale/zh_CN';
import './src/styles/global.css';

// 导入页面组件
import HomeScreen from './src/screens/HomeScreen';
import CallScreen from './src/screens/CallScreen';
import DocumentScreen from './src/screens/DocumentScreen';
import SettingsScreen from './src/screens/SettingsScreen';

// 导入移动端导航组件
import MobileNavigation from './src/components/MobileNavigation.web';

const App: React.FC = () => {
  return (
    <ConfigProvider locale={zhCN}>
      <Router 
        future={{
          v7_startTransition: true,
          v7_relativeSplatPath: true
        }}
      >
        <div className="app-container">
          <div className="app-content">
            <Routes>
              <Route path="/" element={<Navigate to="/home" replace />} />
              <Route path="/home" element={<HomeScreen />} />
              <Route path="/call" element={<CallScreen />} />
              <Route path="/documents" element={<DocumentScreen />} />
              <Route path="/settings" element={<SettingsScreen />} />
            </Routes>
          </div>
          <MobileNavigation />
        </div>
      </Router>
    </ConfigProvider>
  );
};

export default App; 