import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { GoodsInCleanupListComponent } from './goods-in-cleanup-list/goods-in-cleanup-list.component';
import { GoodsInCleanupListModule } from './goods-in-cleanup-list/goods-in-cleanup-list.module';
import { GoodsInDetailsComponent } from './goods-in-details';
import { GoodsInEditModule } from './goods-in-edit';
import { GoodsInEditComponent } from './goods-in-edit/goods-in-edit.component';
import { GoodsInListComponent } from './goods-in-list/goods-in-list.component';
import { GoodsInListModule } from './goods-in-list/goods-in-list.module';
import { GoodsInRemissionPreviewComponent } from './goods-in-remission-preview/goods-in-remission-preview.component';
import { GoodsInRemissionPreviewModule } from './goods-in-remission-preview/goods-in-remission-preview.module';
import { GoodsInReservationComponent } from './goods-in-reservation/goods-in-reservation.component';
import { GoodsInReservationModule } from './goods-in-reservation/goods-in-reservation.module';
import { GoodsInSearchComponent, GoodsInSearchModule } from './goods-in-search';
import { GoodsInSearchMainComponent, GoodsInSearchMainModule } from './goods-in-search/search-main';
import { GoodsInSearchResultsModule } from './goods-in-search/search-results';
import { GoodsInSearchResultsComponent } from './goods-in-search/search-results/goods-in-search-results.component';
import { GoodsInComponent } from './goods-in.component';

const routes: Routes = [
  {
    path: '',
    component: GoodsInComponent,
    children: [
      {
        path: '',
        component: GoodsInSearchComponent,
        children: [
          { path: '', component: GoodsInSearchMainComponent },
          { path: 'results', component: GoodsInSearchResultsComponent },
        ],
      },
      {
        path: 'details/customer/:customerNumber/order/:orderNumber/item/:orderItemId/:processingStatus',
        component: GoodsInDetailsComponent,
      },
      {
        path: 'details/customer/:customerNumber/order/:orderNumber/item/:orderItemId/:processingStatus/edit',
        component: GoodsInEditComponent,
      },
      { path: 'list', component: GoodsInListComponent },
      { path: 'reservation', component: GoodsInReservationComponent },
      { path: 'cleanup', component: GoodsInCleanupListComponent },
      { path: 'preview', component: GoodsInRemissionPreviewComponent },
    ],
  },
];
@NgModule({
  imports: [
    RouterModule.forChild(routes),
    GoodsInSearchModule,
    GoodsInSearchResultsModule,
    GoodsInSearchMainModule,
    GoodsInEditModule,
    GoodsInListModule,
    GoodsInCleanupListModule,
    GoodsInReservationModule,
    GoodsInRemissionPreviewModule,
  ],
  exports: [RouterModule],
})
export class GoodsInRoutingModule {}
