import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import {RouterModule, Routes} from '@angular/router';
import {MatTabsModule} from '@angular/material/tabs';
import { SharedModule } from 'src/app/shared/shared.module';
import { RandomQuestionsRouter } from './router/router';
import { RandomQuestionsContainer } from './container/random-questions/random-questions.container';
import { RandomQuestionsSearchComponent } from './presenter/search/random-questions-search/random-questions-search.component';
import { RandomQuestionsListComponent } from './presenter/list/random-questions-list/random-questions-list.component';
import { RandomQuestionsSubjectListComponent } from './presenter/subject-list/random-questions-subject-list/random-questions-subject-list.component';
import { RandomQuestionsFormContainer } from './presenter/form/container/random-questions-form/random-questions-form.container';
import { GroupListComponent } from './presenter/form/type/group/group-list/group-list.component';
import { CategoryListComponent } from './presenter/form/type/category/category-list/category-list.component';
import { ViewComponent } from './presenter/view/view/view.component';
import { TeacherComponent } from './presenter/form/type/teacher/teacher.component';
import { RandomListComponent } from './presenter/random-list/random-list/random-list.component';


const routes: Routes = [
  {
    path: '',
    component: RandomQuestionsRouter,
    children: [
      {
        path: '',
        component: RandomQuestionsContainer
      },
      {
        path: ':id',
        component: RandomQuestionsSubjectListComponent
      },
      {
        path: 'setting/:id/:uid',
        component: RandomQuestionsFormContainer
      },
      {
        path: 'view/:id',
        component: ViewComponent
      },
      {
        path: 'random/:id/:testing_uid',
        component: RandomListComponent
      },
    ]
  }
];

@NgModule({
  declarations: [
    RandomQuestionsRouter,
    RandomQuestionsContainer,
    RandomQuestionsSearchComponent,
    RandomQuestionsListComponent,
    RandomQuestionsSubjectListComponent,
    RandomQuestionsFormContainer,
    GroupListComponent,
    CategoryListComponent,
    ViewComponent,
    TeacherComponent,
    RandomListComponent
  ],
  imports: [
    CommonModule,
    SharedModule,
    RouterModule.forChild(routes),
    MatTabsModule
  ]
})
export class RandomQuestionsModule { }
