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 { GalleryComponent } from './gallery/gallery.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},
      // { path: 'add-tenders/:id', component: AddTendersComponent},
      { path: 'qr-payment/:id', component: QrPaymentComponent},
      { path: 'gallery', component: GalleryComponent}
      
      // { 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 { }
