import { Component, HostListener,OnInit} from '@angular/core';
import { AuthService } from '../../services/auth.service';
import { LocalStorageService } from 'angular-2-local-storage';
import {Router} from '@angular/router';
import {NavigationService} from '../../services/navigation/navigation.service'
import {WorkspaceService} from '../../services/workspace.service';
import { environment } from '../../../environments/environment.dev';

@Component({
  selector: 'app-cflanding',
  templateUrl: './cflanding.component.html',
  styleUrls: ['./cflanding.component.css']
})
export class CFlandingComponent implements OnInit {


  userIcon='';
  calledclass = '';
  Id= 95;
  public registeredCandidates;
  public listCandidates;
  Location="Chennai";
  SkillId=1;
  filterActive = 'all';
  CFLANDING= false;
  name : string
  fullName : string

  empData: {
    accessToken: any,
    loginType: any,
    fullName: any,
    firstName: any,
    userInfoMstrId: any,
    roleName: any,
    roles: any,
    skills: any,
    location: any
  };

  img_path = environment.imageUrl+'/assets/img/CFlanding/';
ROLES = ['candidate','employee'];
role:string;
  constructor(protected localStorageService: LocalStorageService,
              private AuthService:AuthService,
              private router: Router,
              private navigate:NavigationService,
              private WorkspaceService:WorkspaceService) {


  }

  ngOnInit() {


  }
  receiveRole($event){
    console.log($event);
    this.role = $event;
    if(this.role == 'candidate'){
      this.router.navigate(['coach/landing']);
    }
    else if(this.role == 'employee'){
      this.router.navigate(['coach/landing/employee']);
    }
  }


  isError;






}
