import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { QCMComponent } from './qcm.component';
import { QCMResolver } from './qcm-resolver.service';
import { AuthGuard } from 'src/app/core/services';

const routes: Routes = [
    {
        path: ':type',
        component: QCMComponent,
        canActivate: [AuthGuard],
        resolve: {
            qcm: QCMResolver
        }
    }
];

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