import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import {Observable} from 'rxjs/Observable';




@Injectable()
export class CoachCandidateEvaluationService {

  coachCandidateTechnincalEvaluation: {description: any[],event:'',overAllComment:''};
  technicalcompleted:boolean;

  private _show_thankyou_sent: BehaviorSubject<boolean> = new BehaviorSubject(false);

  public readonly show_thankyou_sent: Observable<boolean> = this._show_thankyou_sent.asObservable();


  public _set_proper_active_tab: BehaviorSubject<number> = new BehaviorSubject(null);
  public readonly set_proper_active_tab: Observable<number> = this._set_proper_active_tab.asObservable();

  public tab:number;

  constructor() { }

  getcoachCandidateTechnincalEvaluationData(){

    return this.coachCandidateTechnincalEvaluation;
  }
  setcoachCandidateTechnincalEvaluationData(data){
    this.coachCandidateTechnincalEvaluation = data;
  }


  coachEvaluationCompletedThanks() {
    this._show_thankyou_sent.next(true);
  }

  coachEvaluationCompletedThanksClose() {
    this._show_thankyou_sent.next(false);
  }

  setProperActiveTab(tab:number){

    this._set_proper_active_tab.next(tab);
  }



}
