import profilePage from '@/pages/profile';
import profile from '@/components/profile/Profile';
import myClass from '@/pages/myClass';
import activity from '@/pages/activity';
import oldClasses from '@/pages/oldClasses';
import createClass from '@/pages/createClass';
import showSchoolClassCode from '@/pages/me/showSchoolClassCode';
import showTeamCode from '@/pages/me/showTeamCode';
import myTeam from '@/pages/me/myTeam';
import joinTeam from '@/pages/me/joinTeam';
import createTeam from '@/pages/me/createTeam';

import {CREATE_TEAM, JOIN_TEAM, MY_TEAM, SHOW_SCHOOL_CLASS_CODE, SHOW_TEAM_CODE} from './me.names';
import {LAYOUT_SIMPLE} from '@/router/core.constants';

export default [
  {
    path: '/me',
    component: profilePage,
    children: [
      {path: 'profile', name: 'profile', component: profile, meta: {isProfile: true}},
      {path: 'class', alias: 'my-class', name: 'my-class', component: myClass, meta: {isProfile: true}},
      {path: 'activity', name: 'activity', component: activity, meta: {isProfile: true}},
      {path: '', name: 'profile-activity', component: activity, meta: {isProfile: true}},
      {
        path: 'old-classes',
        name: 'old-classes',
        component: oldClasses,
        meta: {isProfile: true},
      },
      {
        path: 'class/create',
        alias: 'create-class',
        name: 'create-class',
        component: createClass,
        meta: {layout: LAYOUT_SIMPLE},
      },
      {
        path: 'class/code',
        alias: 'show-code',
        name: SHOW_SCHOOL_CLASS_CODE,
        component: showSchoolClassCode,
        meta: {layout: LAYOUT_SIMPLE},
      },
      {path: 'team', name: MY_TEAM, component: myTeam, meta: {isProfile: true}},
      {path: 'team/join', name: JOIN_TEAM, component: joinTeam, meta: {isProfile: true, layout: LAYOUT_SIMPLE}},
      {path: 'team/create', name: CREATE_TEAM, component: createTeam, meta: {isProfile: true, layout: LAYOUT_SIMPLE}},
      {
        path: 'team/code',
        name: SHOW_TEAM_CODE,
        component: showTeamCode,
        meta: {layout: LAYOUT_SIMPLE},
      },
    ],
  },
];
