import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule, Routes } from '@angular/router';
import { FlightInventorySearchComponent } from './flight-inventory-search/flight-inventory-search.component';
import { FlightInventoryAddComponent } from './flight-inventory-add/flight-inventory-add.component';
import { NgSelectModule } from '@ng-select/ng-select';
import { CalendarModule } from 'primeng/calendar';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { ToastModule } from 'primeng/toast';
import { TableModule } from 'primeng/table';
import { MatButtonModule } from '@angular/material/button';
import { MatMenuModule } from '@angular/material/menu';
import { ToolbarModule } from 'primeng/toolbar';
import { MessageService } from 'primeng/api';
import { InputTextModule } from 'primeng/inputtext';
import { DialogModule } from 'primeng/dialog';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { FileUploadModule } from 'primeng/fileupload';
import { FlightContractService } from 'src/app/core/services/flight-contract.service.ts/flight-contract.service';

const routes: Routes = [
  {
    path: 'Search',
    component: FlightInventorySearchComponent,
  },
  {
    path: 'Add',
    component: FlightInventoryAddComponent,
  },
  {
    path: 'Clone/:RuleId',
    component: FlightInventoryAddComponent,
  },
  {
    path: 'Manage',
    loadChildren: () =>
      import('./flight-inventory-manage/flight-inventory-manage.module').then(
        (m) => m.FlightInventoryManageModule
      ),
  },
]

@NgModule({
  declarations: [
    FlightInventorySearchComponent,
    FlightInventoryAddComponent
  ],
  imports: [
    ToastModule,
    TableModule,
    DialogModule,
    CommonModule,
    FileUploadModule,
    ToolbarModule,
    MatMenuModule,
    CalendarModule,
    NgSelectModule,
    InputTextModule,
    ReactiveFormsModule,
    FormsModule,
    MatButtonModule,
    MatCheckboxModule,
    RouterModule.forChild(routes),
  ],
  providers: [MessageService,FlightContractService],
})
export class FlightInventoryModule { }
