import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
  selector: 'app-employee-information',
  templateUrl: './employee-information.component.html',
  styleUrls: ['./employee-information.component.scss'],
  
})
export class EmployeeInformationComponent implements OnInit {
public direction: string;
  public userImage: any = '../assets/imgs/profile.png';
  @Input() name: string;
  @Input() title: string;
  @Input() employeeImage: string;
  @Input() employeePhoneNumber: string;
  // tslint:disable-next-line: no-output-on-prefix
  @Output() onGetDetails = new EventEmitter();

  constructor(
    public ts: TranslatorService,
  ) { 
    this.direction = TranslatorService.getCurrentLanguageName();
  }

  ngOnInit() {
    console.log(this.title);
    let jobTitle = this.title.split('.');
    if (jobTitle && jobTitle.length > 1) {
      this.title = jobTitle[0] + " " + jobTitle[1];
    }​
  }

  getDetails() {
    this.onGetDetails.emit();
  }

}
