import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import {SharedModule} from '../../shared/shared.module';
import {RouterModule, Routes} from '@angular/router';
import { CreateExamSeatRouter } from './router/router';
import { TestingInfoContainer } from './container/testing-info/testing-info.container';
import { TestingInfoListComponent } from './presenter/testing-info-list/testing-info-list.component';
import { TestingInfoSearchComponent } from './presenter/testing-info-search/testing-info-search.component';
import { ViewComponent } from './presenter/view/view.component';
import { CreateSeatComponent } from './presenter/create-seat/create-seat.component';
import { StudentDialogComponent } from './presenter/student-dialog/student-dialog.component';

const routes: Routes = [
  {
    path: '',
    component: CreateExamSeatRouter,
    children: [
      {
        path: '',
        component: TestingInfoContainer
      },
      {
        path: 'view/:id',
        component: ViewComponent
      },
      {
        path: 'seat/:testing_information_uid/:branch_uid/:testing_field_uid/:testing_center_uid/:testing_date/:section/:total_seat_generate/:total_student',
        component: CreateSeatComponent
      },
    ]
  }
];

@NgModule({
  declarations: [
    CreateExamSeatRouter,
    TestingInfoContainer,
    TestingInfoListComponent,
    TestingInfoSearchComponent,
    ViewComponent,
    CreateSeatComponent,
    StudentDialogComponent
  ],
  imports: [
    CommonModule,
    SharedModule,
    RouterModule.forChild(routes),
  ]
})
export class CreatExamSeatModule { }
