import { Component, OnInit, Input } 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';


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

  isError;
  role;
  ROLES = ['candidate','coach','employee'];

  @Input() videos:any;
  
  showVideo: any;
  constructor(protected localStorageService: LocalStorageService,
              private AuthService:AuthService,
              private router: Router,
              private navigate:NavigationService,
              private WorkspaceService:WorkspaceService) {


  }


  ngOnInit() {
    console.log(this.videos);
  }

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


}
