import { NgModule } from '@angular/core';

import { DashboardComponent } from './dashboard.component';
import { HomeViewComponent } from './home-view/home-view.component';
import { HomeUploadComponent } from './home-upload/home-upload.component';
import { AddTendersComponent } from './add-tenders/add-tenders.component';
import { QrPaymentComponent } from './qr-payment/qr-payment.component';
import { PaymentDetailsComponent } from './payment-details/payment-details.component';
import { LayoutComponentComponent } from './layout-component/layout-component.component';
import { RouterModule, Routes } from '@angular/router';
import { PreviewApprovalComponent } from './preview-approval/preview-approval.component';
import { UserApprovalComponent } from './user-approval/user-approval.component';
import { TenderCategoryComponent } from './tender-category/tender-category.component';
import { UserManagementComponent } from './user-management/user-management.component';
 

const routes: Routes = [
  {
    path: '', component: LayoutComponentComponent, children: [
      { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
      { path: 'dashboard', component: DashboardComponent },
      {path:'tender-view/:id', component:HomeViewComponent},
      {path:'tender-view/:id/:pay', component:HomeViewComponent},
      { path :'payment-details/:id' , component:PaymentDetailsComponent},
      {path:'tender-upload/:id',component:HomeUploadComponent},
      // { path: 'add-tenders', component: AddTendersComponent}, //enable if admin need to create tenders
      { path: 'add-tenders/:id', component: AddTendersComponent},
      { path: 'qr-payment/:id', component: QrPaymentComponent},
      { path: 'preview-approval', component: PreviewApprovalComponent},
      { path: 'user-approval', component: UserApprovalComponent},
      { path: 'category', component: TenderCategoryComponent},
      { path: 'user-management', component: UserManagementComponent},



      
      // { path: 'master', loadChildren: () => import('../master/master.module').then(m => m.MasterModule) },
      // { path: 'report', loadChildren: () => import('../report/report.module').then(m => m.ReportModule) },
      // { path: 'support', loadChildren: () => import('../support/support.module').then(m => m.SupportModule) },
      // { path: 'transaction', loadChildren: () => import('../transaction/transaction.module').then(m => m.TransactionModule) }
    ]
  },
];

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