import CourseDetailPage from '../pages/CourseDetailPage';
import CourseHomePage from '../pages/CourseHomePage';
import MyCoursePage from '../pages/MyCoursePage';
import CoursePlayerPage from '../pages/CoursePlayerPage';
import GuestCoursePlayerPage from '../pages/GuestCoursePlayerPage';
import CreateCourse from '../pages/CreateCoursePage';
import AllAlbumsPage from '../pages/AllAlbumsPage';
import AllCoursesPage from '../pages/AllCoursesPage';
import DiscussionBoardPage from '../pages/DiscussionBoardPage';
import MediaPlayerPage from '../pages/MediaPlayerPage';
import VideoPlayerPage from '../pages/VideoPlayerPage';
import WechatPage from '../pages/WechatPage';
import WechatCourseDetailPage from '../pages/WechatCourseDetailPage';

const routes = [
  {
    path: '/wechat',
    title: '微信公众号-杏聆荟学院',
    component: <WechatPage />,
  },
  {
    path: '/wechat_video_detail/:courseCode/:language?',
    title: '微信公众号-视频播放页',
    component: <WechatCourseDetailPage />,
  },
  {
    path: '/course/:token/:platform/:language?',
    title: '课程首页',
    component: <CourseHomePage />,
  },
  {
    path: '/all_albums/:language?',
    title: '查看更多 -> 全部专辑',
    component: <AllAlbumsPage />,
  },
  {
    path: '/all_courses/:token/:platform/:language?',
    title: '查看更多 -> 全部课程',
    component: <AllCoursesPage />,
  },
  {
    path: '/my_course/:token/:platform/:language?',
    title: '我的课程',
    component: <MyCoursePage />,
    exact: false,
  },
  {
    path: '/detail/:courseCode/:subsetTab/:language?',
    title: '课程详情',
    component: <CourseDetailPage />,
  },
  {
    path: '/create_course/:language?',
    title: '创建课程',
    component: <CreateCourse />,
  },
  {
    path: '/guest_video_course_player/:courseCode/:language?',
    title: '游客的课程播放器',
    component: <GuestCoursePlayerPage />,
  },
  {
    path: '/video_course_player/:courseCode/:platform?/:token?/:language?',
    title: '课程播放器',
    component: <CoursePlayerPage />,
  },
  {
    path: '/media_player/:fileUrl/:platform/:language?',
    title: '通用媒体播放器',
    component: <MediaPlayerPage />,
  },
  {
    path: '/video_player/:fileUrl/:platform/:language?',
    title: '通用视频播放器',
    component: <VideoPlayerPage />,
  },
  {
    path: '/discussionBoard/:courseCode/:token/:language?',
    title: '讨论区',
    component: <DiscussionBoardPage />,
  },
];
export default routes;
