import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
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: "booking_agent", component: CrudGridComponent, canActivate: [AuthGuard, ResourceAuthGuard],
    resolve: {Template: TemplateResolver},
    data: {
      innerTemplate: 'none',
      program: "booking_agent",
      breadcrumb: "breadcrumb.booking_agent"
    },
  },
  {
    path: 'booking_agent/detail/:mode', component: CrudDetailComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard],
    resolve: {record: RecordResolver},
    data: {
      program: 'booking_agent',
      breadcrumb: 'breadcrumb.booking_agent.detail'
    }
  }
]

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