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 { GradeSummaryContainer } from './container/grade-summary/grade-summary.container';
import { GradeSummaryRouter } from './router/router';
import { GradeSummarySubjectListComponent } from './presenter/subject-list/grade-summary-subject-list/grade-summary-subject-list.component';
import { GradeSummarySearchComponent } from './presenter/search/grade-summary-search/grade-summary-search.component';
import { GradeSummaryListComponent } from './presenter/list/grade-summary-list/grade-summary-list.component';
import { GradeSummaryComponent } from './presenter/grade/grade-summary/grade-summary.component';
import { ViewComponent } from './presenter/view/view/view.component';
import { GradeDialogComponent } from './presenter/grade-dialog/grade-dialog.component';
import { GradeListComponent } from './presenter/grade-list/grade-list/grade-list.component';


const routes: Routes = [
  {
    path: '',
    component: GradeSummaryRouter,
    children: [
      {
        path: '',
        component: GradeSummaryContainer
      },
      {
        path: ':id',
        component: GradeSummarySubjectListComponent
      },
      {
        path: 'summary/:id/:uid',
        component: GradeSummaryComponent
      },
      {
        path: 'grade/:id/:uid',
        component: GradeListComponent
      },
      {
        path: 'view/:id',
        component: ViewComponent
      },
    ]
  }
];

@NgModule({
  declarations: [
  GradeSummaryContainer,
  GradeSummaryRouter,
  GradeSummarySubjectListComponent,
  GradeSummarySearchComponent,
  GradeSummaryListComponent,
  GradeSummaryComponent,
  ViewComponent,
  GradeDialogComponent,
  GradeListComponent
],
  imports: [
    CommonModule,
    SharedModule,
    RouterModule.forChild(routes),
    MatTabsModule
  ]
})
export class GradeSummaryModule { }
