import { Component, OnInit, ViewEncapsulation, Output, Input, EventEmitter } from '@angular/core';
import { environment } from '../../../../environments/environment.dev';
@Component({
  selector: 'app-employee-review-status',
  templateUrl: './employee-review-status.component.html',
  styleUrls: ['./employee-review-status.component.scss']
})
export class EmployeeReviewStatusComponent implements OnInit {

  imagelink: string;
  @Input() statuscount: any;
  @Output() statusfilter = new EventEmitter<any>();
  @Input() activefilter: any;
  constructor() { }

  ngOnInit() {
    this.imagelink = environment.imageUrl+'/assets/img/employee/newdashboard/';
  }

  getrecord(x) {
    this.activefilter = x;
    this.statusfilter.emit(x);
  }

  getcolor(x) {
    const status = x;
    let color = '';
    switch (status) {
      case 'Overdue':
        color = '#F97787';
        return color;
      case 'To Do':
        color = '#68CBFF';
        return color;
      case 'Done':
        color = '#15CC83';
        return color;
      default:
        color = '#ffffff';
        return color;
    }
  }

}
