/**
 * ASL模块入口
 * AI智能文献筛选模块
 */

import { Suspense, lazy } from 'react';
import { Routes, Route, Navigate } from 'react-router-dom';
import { Spin } from 'antd';

// 懒加载组件
const ASLLayout = lazy(() => import('./components/ASLLayout'));
const TitleScreeningSettings = lazy(() => import('./pages/TitleScreeningSettings'));
const TitleScreeningWorkbench = lazy(() => import('./pages/ScreeningWorkbench'));
const TitleScreeningResults = lazy(() => import('./pages/ScreeningResults'));

const ASLModule = () => {
  return (
    <Suspense 
      fallback={
        <div className="flex items-center justify-center h-screen">
          <Spin size="large" />
        </div>
      }
    >
      <Routes>
        <Route path="" element={<ASLLayout />}>
          <Route index element={<Navigate to="screening/title/settings" replace />} />
          <Route path="screening/title">
            <Route index element={<Navigate to="settings" replace />} />
            <Route path="settings" element={<TitleScreeningSettings />} />
            <Route path="workbench" element={<TitleScreeningWorkbench />} />
            <Route path="results" element={<TitleScreeningResults />} />
          </Route>
        </Route>
      </Routes>
    </Suspense>
  );
};

export default ASLModule;









