import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Routes, RouterModule } from '@angular/router';
import { SharedModule } from 'src/app/shared/shared.module';
import { ManageTestCenterRouterComponent } from './manage-test-center-router/manage-test-center-router.component';
import { ManageTestCenterListComponent } from './presenter/manage-test-center-list/manage-test-center-list.component';
import { ManageTestCenterSearchComponent } from './presenter/manage-test-center-search/manage-test-center-search.component';
import { ManageTestCenterFormComponent } from './presenter/manage-test-center-form/manage-test-center-form.component';
import { ManageTestCenterTableComponent } from './presenter/manage-test-center-table/manage-test-center-table.component';
import { CopyComponent } from './presenter/dialog/copy/copy.component';
import { PreviewComponent } from './presenter/dialog/preview/preview.component';
import { ViewSeatComponent } from './presenter/dialog/view-seat/view-seat.component';

const routes: Routes = [
  {
    path: '',
    component: ManageTestCenterRouterComponent,
    children: [
      {
        path: '',
        component: ManageTestCenterListComponent,
      },
      {
        path: 'search',
        component: ManageTestCenterTableComponent,
      },
      {
        path: 'add',
        component: ManageTestCenterFormComponent,
      },
      {
        path: 'edit/:id',
        component: ManageTestCenterFormComponent,
      },
    ],
  },
];

@NgModule({
  declarations: [
    ManageTestCenterRouterComponent,
    ManageTestCenterListComponent,
    ManageTestCenterSearchComponent,
    ManageTestCenterFormComponent,
    ManageTestCenterTableComponent,
    CopyComponent,
    PreviewComponent,
    ViewSeatComponent
  ],
  imports: [
    CommonModule,
    SharedModule,
    RouterModule.forChild(routes)
  ]
})
export class ManageTestCenterModule { }
