import { Redirect, Route } from 'react-router-dom';
import Tab1 from './pages/Tab1';
import Lesson from './pages/Lesson/index';
import Tab2 from './pages/Tab2';
import Tab3 from './pages/Tab3';
import Setting from './pages/Setting';

import LessonSequencing from './pages/Sequencing';
import QuizzesMainMenu from './pages/QuizzesMainMenu';
import DebugPage from './pages/DebugPage';
import LessonWordPage from './pages/LessonWord';
import VocabularyPage from './pages/Lesson/VocabularyPage';
import ConnectivesPage from './pages/Lesson/ConnectivesPage';
import ListeningPractice from './pages/ListeningPractice';
import Page from './pages/Page';
import QuestionRoute from './pages/ListeningPractice/Route';
import CorrectionRoute from './pages/ListeningPractice/Route/Correction';
import PracticeFinish from './pages/ListeningPractice/Finish';

function RouteConfig() {
  return (
    <>
      <Route exact path='/quizzes_main_menu'>
        <QuizzesMainMenu />
      </Route>
      <Route exact path='/lesson'>
        <Lesson />
      </Route>
      <Route exact path='/listening_practice/:p_route'>
        <QuestionRoute />
      </Route>
      <Route exact path='/listening_practice/c/:p_route'>
        <CorrectionRoute />
      </Route>
      <Route exact path='/listening_practice/finish'>
        <PracticeFinish />
      </Route>
      <Route exact path='/listening_practice'>
        <ListeningPractice />
      </Route>
      <Route exact path='/lesson_word_page'>
        <LessonWordPage />
      </Route>
      <Route exact path='/vocabulary_page'>
        <VocabularyPage />
      </Route>
      <Route exact path='/conectives_page'>
        <ConnectivesPage />
      </Route>
      <Route exact path='/listening_practice'>
        <ListeningPractice />
      </Route>
      <Route exact path='/lesson_sequence_demo'>
        <LessonSequencing />
      </Route>
      <Route exact path='/tab1'>
        <Tab1 />
      </Route>
      <Route exact path='/tab2'>
        <Tab2 />
      </Route>
      <Route path='/tab3'>
        <Tab3 />
      </Route>
      <Route path='/setting'>
        <Setting />
      </Route>
      <Route path='/page/:name' exact={true}>
        <Page />
      </Route>
      <Route exact path='/debug'>
        <DebugPage />
      </Route>
      <Route exact path='/'>
        <Redirect to='/debug' />
      </Route>
    </>
  );
}

export { RouteConfig };
