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 Page from './pages/Page';
//
import ListeningPractice from './pages/ListeningPractice';
import QuestionRoute from './pages/ListeningPractice/Route';
import CorrectionRoute from './pages/ListeningPractice/Route/Correction';
import PracticeFinish from './pages/ListeningPractice/Finish';
//
import MatchingFrenzySelectCategory from './pages/MatchingFrenzy/SelectCategory';
import MatchingFrenzyMatchRun from './pages/MatchingFrenzy/MatchRun';
import MatchingFrenzyMatchResult from './pages/MatchingFrenzy/MatchResult';
// import CorrectionRoute from './pages/MatchingFrenzy/Route/Correction';
// import PracticeFinish from './pages/MatchingFrenzy/Finish';
import ConnectiveRevisionSelectCategory from './pages/ConnectiveRevision/SelectCategory';
import ConnectiveRevisionQuizRun from './pages/ConnectiveRevision/QuizRun';
import ConnectiveRevisionQuizResult from './pages/ConnectiveRevision/QuizResult.tsx';

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='/connective_revision/result'>
        <ConnectiveRevisionQuizResult />
      </Route>
      <Route exact path='/connective_revision/r/technology'>
        <ConnectiveRevisionQuizRun />
      </Route>
      <Route exact path='/connective_revision'>
        <ConnectiveRevisionSelectCategory />
      </Route>
      {/*  */}
      <Route exact path='/matching_frenzy/r/:p_route'>
        <MatchingFrenzyMatchRun />
      </Route>
      <Route exact path='/matching_frenzy/result'>
        <MatchingFrenzyMatchResult />
      </Route>
      <Route exact path='/matching_frenzy'>
        <MatchingFrenzySelectCategory />
      </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 };
