import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { DeltagareComponent } from './deltagare.component';

const routes: Routes = [
  {
    path: '',
    component: DeltagareComponent,
  },
  {
    path: ':deltagareId',
    data: { title: 'Deltagareinformation' },
    loadChildren: () => import('./pages/deltagare-card/deltagare-card.module').then(m => m.DeltagareCardModule),
  },
  {
    path: 'rapportera/:deltagareId',
    data: { title: 'Skapa rapport' },
    loadChildren: () => import('./pages/deltagare-report/deltagare-report.module').then(m => m.DeltagareReportModule),
  },
];

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