import { Routes } from "@angular/router";

import { NotFoundComponent } from './not-found/not-found.component';
import { ErrorComponent } from './error/error.component';
import { ForgotComponent } from './forgot/forgot.component';
import { LockscreenComponent } from './lockscreen/lockscreen.component';
import { SigninComponent } from './signin/signin.component';
import { SignupComponent } from './signup/signup.component';

import { ApiConsumerTokenResolve } from '../token';

export const SessionRoutes: Routes = [
  {
    path: '',
    children: [{
      path: '404',
      component: NotFoundComponent
    }, {
      path: 'error',
      component: ErrorComponent
    }, {
      path: 'forgot',
      component: ForgotComponent,
      resolve: {
        token: ApiConsumerTokenResolve
      }
    }, {
      path: 'lockscreen',
      component: LockscreenComponent,
      resolve: {
        token: ApiConsumerTokenResolve
      }
    }, {
      path: 'signin',
      component: SigninComponent,
      resolve: {
        token: ApiConsumerTokenResolve
      }
    }, {
      path: 'signup',
      component: SignupComponent,
      resolve: {
        token: ApiConsumerTokenResolve
      }
    }]
  }
];
