import {NgModule} from "@angular/core";
import {RouterModule, Routes} from "@angular/router";
import {ConfirmExitGuard} from "@webbpm/base-package";
import {RolesGuard} from "./guard/RolesGuard";


const appRoutes: Routes = [
  {
    path: 'app_list',
    loadChildren: 'generated-sources/page-app_list.module#Pageapp_listModule',
    canActivate: [ConfirmExitGuard, RolesGuard]
  },
  {
    path: 'add_user_application',
    loadChildren: 'generated-sources/page-add_user_application.module#Pageadd_user_applicationModule',
    canActivate: [ConfirmExitGuard, RolesGuard]
  },
  {
    path: 'edit_user_application',
    loadChildren: 'generated-sources/page-edit_user_application.module#Pageedit_user_applicationModule',
    canActivate: [ConfirmExitGuard, RolesGuard]
  },
  {
    path: 'block_user_application',
    loadChildren: 'generated-sources/page-block_user_application.module#Pageblock_user_applicationModule',
    canActivate: [ConfirmExitGuard, RolesGuard]
  },
  {
    path: 'reset_password',
    loadChildren: 'generated-sources/page-reset_password.module#Pagereset_passwordModule',
    canActivate: [ConfirmExitGuard, RolesGuard]
  },
  {
    path: 'process_application/:id',
    loadChildren: 'generated-sources/page-process_application.module#Pageprocess_applicationModule',
    canActivate: [ConfirmExitGuard, RolesGuard]
  },
  {
    path: 'process_application_edit_user/:id',
    loadChildren: 'generated-sources/page-process_application_edit_user.module#Pageprocess_application_edit_userModule',
    canActivate: [ConfirmExitGuard, RolesGuard]
  },
  {
    path: 'unblock_user_application',
    loadChildren: 'generated-sources/page-unblock_user_application.module#Pageunblock_user_applicationModule',
    canActivate: [ConfirmExitGuard, RolesGuard]
  }
];

@NgModule({
  imports: [RouterModule.forChild(appRoutes)],
  exports: [RouterModule]
})
export class AppRoutingModule {

}
