import { NgModule } from '@angular/core';
import { Routes } from '@angular/router';
import { NativeScriptRouterModule } from '@nativescript/angular';

import { InventoryConfirmedComponent } from './containers/inventory-confirmed/inventory-confirmed.component';
import { InventoryNewComponent } from './containers/inventory-new/inventory-new.component';
import { InventoryWaitingConfirmComponent } from './containers/inventory-waiting-confirm/inventory-waiting-confirm.component';
import { InventoryWarehouseComponent } from './containers/inventory-warehouse/inventory-warehouse.component';
import { InventoryComponent } from './containers/inventory/inventory.component';
import { MaterialDeleteComponent } from './containers/material-delete/material-delete.component';
import { MaterialDetailComponent } from './containers/material-detail/material-detail.component';
import { MaterialLendComponent } from './containers/material-lend/material-lend.component';
import { MaterialNewComponent } from './containers/material-new/material-new.component';
import { MaterialUnitComponent } from './containers/material-unit/material-unit.component';
import { MaterialUpdateComponent } from './containers/material-update/material-update.component';
import { MaterialComponent } from './containers/material/material.component';
import { ReservationBorrowedDetailComponent } from './containers/reservation-borrowed-detail/reservation-borrowed-detail.component';
import { ReservationBorrowedComponent } from './containers/reservation-borrowed/reservation-borrowed.component';
import { ReservationLentDetailComponent } from './containers/reservation-lent-detail/reservation-lent-detail.component';
import { ReservationLentComponent } from './containers/reservation-lent/reservation-lent.component';
import { ReservationNewComponent } from './containers/reservation-new/reservation-new.component';
import { ReservationUpdateComponent } from './containers/reservation-update/reservation-update.component';
import { ReservationComponent } from './containers/reservation/reservation.component';
import { WarehouseDetailComponent } from './containers/warehouse-detail/warehouse-detail.component';
import { WarehouseUnitComponent } from './containers/warehouse-unit/warehouse-unit.component';
import { WarehouseUpdateComponent } from './containers/warehouse-update/warehouse-update.component';

const routes: Routes = [
    { path: '', component: MaterialComponent},
    { path: 'materialUnit', component: MaterialUnitComponent},
    { path: 'warehouseUnit', component: WarehouseUnitComponent},
    { path: 'inventory', component: InventoryComponent},
    { path: 'reservationBorrowed', component: ReservationBorrowedComponent},
    { path: 'reservationLent', component: ReservationLentComponent},
    { path: 'reservationLentDetail/:idItem/:idReservation', component: ReservationLentDetailComponent},
    { path: 'reservationBorrowedDetail/:id', component: ReservationBorrowedDetailComponent},
    { path: 'reservation', component: ReservationComponent},
    {path: 'reservationNew/:id/:name/:idUnit', component: ReservationNewComponent},
    { path: 'reservationUpdate/:id', component: ReservationUpdateComponent},
    { path: 'materialDetail/:id', component: MaterialDetailComponent},
    { path: 'materialLend/:id/:name', component: MaterialLendComponent},
    { path: 'materialUpdate/:id/:idWarehouse/:idCategory/:idPurchaseType', component: MaterialUpdateComponent},
    { path: 'materialNew/:idWarehouse', component: MaterialNewComponent},
    { path: 'warehouseDetail/:id', component: WarehouseDetailComponent},
    { path: 'warehouseUpdate/:id', component: WarehouseUpdateComponent},
    { path: 'inventoryWarehouse/:id/:name', component: InventoryWarehouseComponent},
    { path: 'inventoryWaitingConfirm/:id', component: InventoryWaitingConfirmComponent},
    { path: 'inventoryConfirmed/:id', component: InventoryConfirmedComponent},
    { path: 'inventoryNew/:date', component: InventoryNewComponent},
    { path: 'materialDelete/:id/:name', component: MaterialDeleteComponent}
];

@NgModule({
    imports: [NativeScriptRouterModule.forChild(routes)],
    exports: [NativeScriptRouterModule]
})
export class MaterialRoutingModule {
}
