import { Routes, RouterModule } from '@angular/router';
import { HomeAdminComponent } from './home-admin/home-admin.component';
import { UserManagementComponent } from './user-management/user-management.component';
import { NgModule } from '@angular/core';
import { HistoryProductComponent } from './history-product/history-product.component';
import { ProductManagementComponent } from './product-management/product-management.component';
import { ProjectManagementComponent } from './project-management/project-management.component';
import { ProjectEmployeeManagementComponent } from './project-management/project-employee-management/project-employee-management.component';
import { ProjectProductManagementComponent } from './project-management/project-product-management/project-product-management.component';
import { TransectionProductManagementComponent } from './transection-product-management/transection-product-management.component';

const routes: Routes = [
  {
    path: "admin",
    children: [
      { path: "home", component: HomeAdminComponent },
      { path: "user-management", component: UserManagementComponent },
      { path: "product-management", component: ProductManagementComponent },
      {
        path: "project-management", component: ProjectManagementComponent, children: [
          { path: "employee", component: ProjectEmployeeManagementComponent },
          { path: "product", component: ProjectProductManagementComponent }
        ]
      },
      { path: "approve-borrow", component: TransectionProductManagementComponent },
      { path: "history-product", component: HistoryProductComponent },

    ]
  }
];


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