import { Component, OnChanges, Input } from '@angular/core';
import { InnovationStatus, InnovationStatusObject, getStatusObject, InnovationStatusInfo, InnovationStatusNames, POCStatus } from 'app/models/InnovationIdea.model';
import { environment } from '../../../../../environments/environment.dev';
@Component({
  selector: 'app-innovation-status',
  templateUrl: './innovation-status.component.html',
  styleUrls: ['./innovation-status.component.scss']
})
export class InnovationStatusComponent implements OnChanges {
  @Input() status: InnovationStatusNames | null = InnovationStatus.Created;

  enumInnovationStatus =  InnovationStatus;
  enumPOCStatus = POCStatus;
  currentStatus: InnovationStatusInfo;
  imageUrl: string = environment.imageUrl;
  constructor() { }

  ngOnChanges() {
    this.currentStatus = this.status && getStatusObject(this.status) || null;
  }

}
