import { BrowserRouter as Router, Route, Routes, Navigate } from 'react-router-dom';
import { ConfigProvider } from 'antd';
import { ToastContainer } from 'react-toastify';
import { App as FlowApps } from './pages/model';
import { App as CodeMirrorApp } from './pages/codemirror';

export const App = () => {
  return (
    <div className='w-full h-full'>
      <ConfigProvider
        theme={{
          token: {},
        }}>
        <Router>
          <Routes>
            <Route path='/' element={<Navigate to='/modal/' />} />
            {/* <Route path='/modal/*' element={<FlowApps />} /> */}
            <Route path='/codemirror/*' element={<CodeMirrorApp />} />
            <Route path='/404' element={<div>404</div>} />
            <Route path='*' element={<div>404</div>} />
          </Routes>
        </Router>
      </ConfigProvider>
      <div id='for-modal'></div>
      <div id='ui-model-list'></div>
      <ToastContainer />
    </div>
  );
};
