import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { CrudDetailComponent, CrudGridComponent, DirtyGuard, RecordResolver, TemplateResolver } from '@xdf/gallery';
import { AuthGuard, ResourceAuthGuard } from '@xdf/security';



const routes: Routes = [
  {
    path: "passenger", component: CrudGridComponent, canActivate: [AuthGuard, ResourceAuthGuard],
    resolve: {Template: TemplateResolver},
    data: {
      innerTemplate: 'none',
      program: "passenger",
      breadcrumb: "breadcrumb.passenger"
    },
  },
  {
    path: 'passenger/detail/:mode', component: CrudDetailComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard],
    resolve: {record: RecordResolver},
    data: {
      program: 'passenger',
      breadcrumb: 'breadcrumb.passenger.detail'
    }
  }
]

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