// COMMON-ANGULAR-MODULES

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

// ROUTING

import { Routes, RouterModule } from '@angular/router';

import { RoleGuard } from './../providers/role-guard.service';

//IMPORTED-PAGE-COMPONENTS

import { IndexComponent } from './index/index.component';
import { ManageproviderComponent } from './manageprovider/manageprovider.component';
import { ForexproviderComponent } from './forexprovider/forexprovider.component';
import { HomeComponent } from './home/home.component';
import { ChangepinComponent } from './changepin/changepin.component';
import { AuthGuard } from './../providers/auth.guard';


const checkerRoutes: Routes = [

	{ path: 'checker', component: IndexComponent, canActivate: [AuthGuard],
		children: [
			{ path: 'delivery', component: ManageproviderComponent },
			{ path: 'forex', component: ForexproviderComponent },
			{ path: 'home', component: HomeComponent },
			{ path: 'changepin', component: ChangepinComponent }
		], data: {role: 5}
	}
];

export const checkerRouting: ModuleWithProviders = RouterModule.forChild(checkerRoutes)

