import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FlightServicesSearchComponent } from './flight-services-search/flight-services-search.component';
import { RouterModule, Routes } from '@angular/router';
import { NgSelectModule } from '@ng-select/ng-select';
import { ButtonModule } from 'primeng/button';
import { CheckboxModule } from 'primeng/checkbox';
import { ProductService } from 'src/app/core/services/product.service';
import { TableModule } from 'primeng/table';
import { ToolbarModule } from 'primeng/toolbar';
import { TreeModule } from 'primeng/tree';
import { MatMenuModule } from '@angular/material/menu';
import { MatButtonModule } from '@angular/material/button';
import { InputNumberModule } from 'primeng/inputnumber';
import { InputTextModule } from 'primeng/inputtext';
import { FlightServicesAddComponent } from './flight-services-add/flight-services-add.component';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { CalendarModule } from 'primeng/calendar';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatDialogModule } from '@angular/material/dialog';
// import { FlightServicesManageComponent } from './flight-services-manage/flight-services-manage.component';
import { MessageService } from 'primeng/api';
import { ToastModule } from 'primeng/toast';

const routes: Routes = [
  {
    path: 'Search',
    component: FlightServicesSearchComponent,
  },
  {
    path: 'Add',
    component: FlightServicesAddComponent,
  },
  {
    path: 'Manage',
    loadChildren: () =>
      import('./flight-services-manage/flight-services-manage.module').then(
        (m) => m.FlightServicesManageModule
      ),
  },

  {
    path: '',
    pathMatch: 'full',
    redirectTo: 'Search',
  },
];

@NgModule({
  declarations: [
    FlightServicesSearchComponent,
    FlightServicesAddComponent,
  ],
  imports: [
    CommonModule,
    ButtonModule,
    NgSelectModule,
    TreeModule,
    ToolbarModule,
    TableModule,
    MatMenuModule,
    MatButtonModule,
    CheckboxModule,
    InputTextModule,
    InputNumberModule,
    CalendarModule,
    FormsModule,
    ReactiveFormsModule,
    MatDialogModule,
    MatButtonModule,
    MatCheckboxModule,
    RouterModule.forChild(routes),
    ToastModule
  ],
  providers: [ProductService, MessageService],
})
export class FlightServicesModule { }
