import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import {SharedModule} from '../../../shared/shared.module';
import {RouterModule, Routes} from '@angular/router';
import { SetRoleRouter } from './router/router';
import { SetRoleContainer } from './container/set-role/set-role.container';
import { SetRoleFormComponent } from './presenter/form/set-role-form/set-role-form.component';
import { SetRoleListComponent } from './presenter/list/set-role-list/set-role-list.component';
import { SetRoleSearchComponent } from './presenter/search/set-role-search/set-role-search.component';

const routes: Routes = [
  {
    path: '',
    component: SetRoleRouter,
    children: [
      {
        path: '',
        component: SetRoleContainer
      },
      {
        path: 'add',
        component: SetRoleFormComponent
      },
      {
        path: 'edit/:id',
        component: SetRoleFormComponent
      }
    ]
  }
];

@NgModule({
  declarations: [
    SetRoleRouter,
    SetRoleContainer,
    SetRoleFormComponent,
    SetRoleListComponent,
    SetRoleSearchComponent
  ],
  imports: [
    CommonModule,
    SharedModule,
    RouterModule.forChild(routes),
  ]
})
export class SetRoleModule { }
