// COMMON-ANGULAR-MODULES

import { ModuleWithProviders } from '@angular/core'

// ROUTING

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

//IMPORTED-PAGE-COMPONENTS

import { IndexComponent } from './index/index.component';
import { ChangepinComponent } from './changepin/changepin.component';
import { EditproviderComponent } from './editprovider/editprovider.component';
import { TransactionComponent } from './transaction/transaction.component';
import { ServiceComponent } from './service/service.component';
import { CurrencyComponent } from './currency/currency.component';
import { AuthGuard } from './../providers/auth.guard';

const ModuleRoutes: Routes = [{
	path: 'forex', component: IndexComponent, canActivate: [AuthGuard],
		children: [
			{path: 'changepin', component: ChangepinComponent},
			{path: 'editprovider', component: EditproviderComponent},
			{path: 'currency', component: CurrencyComponent },
			{path: 'config', component: ServiceComponent },
			{path: '', component: TransactionComponent }
		], data: {role: 2}
	}
];

export const moduleRouting: ModuleWithProviders = RouterModule.forChild(ModuleRoutes)

