import { ShelfSearchResultsComponent } from './pages/shelf-search-results/shelf-search-results.component';
import { ShelfSearchComponent } from './pages/shelf-search/shelf-search.component';
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ShelfOrderDetailsComponent } from './pages/shelf-order-details/shelf-order-details.component';
import { ShelfEditOrderComponent } from './pages/shelf-edit-order/shelf-edit-order.component';
import { ShelfHistoryComponent } from './pages/shelf-history';
import { ShelfOrderDetailsModule } from './pages/shelf-order-details';
import { ShelfEditCompartmentComponent } from './pages/shelf-edit-compartment';
import { ShelfEditOrderFromCustomerComponent } from './pages/shelf-edit-order-from-customer';

export const routes: Routes = [
  {
    path: 'search',
    component: ShelfSearchComponent,
  },
  {
    path: 'results',
    component: ShelfSearchResultsComponent,
  },
  {
    path: 'edit/:id/:orderId/:status/:type/:origin/:customerId/:itemId',
    component: ShelfEditOrderFromCustomerComponent,
  },
  {
    path: 'details/order/:orderId/:processingStatus',
    component: ShelfOrderDetailsComponent,
  },
  {
    path: 'details/compartment/:compartmentCode/:processingStatus',
    component: ShelfOrderDetailsComponent,
  },
  {
    path: 'details/order/:orderNumber/:processingStatus/edit',
    component: ShelfEditOrderComponent,
  },
  {
    path: 'details/compartment/:compartmentCode/:processingStatus/edit',
    component: ShelfEditCompartmentComponent,
  },
  {
    path: 'details/order/:orderId/item/:orderItemId/subset/:orderItemSubsetId/history',
    component: ShelfHistoryComponent,
  },
  {
    path: 'details/compartment/:compartmentCode/item/:orderItemId/subset/:orderItemSubsetId/history',
    component: ShelfHistoryComponent,
  },
];

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