// Agnular Core
import { Component, Input, OnInit } from '@angular/core';

@Component({
  standalone: false,
  selector: 'app-product-upload-status-header',
  templateUrl: './product-upload-status-header.component.html',
  styleUrls: ['./product-upload-status-header.component.scss']
})
export class ProductUploadStatusHeaderComponent implements OnInit {

  @Input() active!:string;

  step1: string = '';
  step2: string = '';
  step3: string = '';

  constructor() { }

  ngOnInit(): void {
  }

  ngOnChanges(){
    switch(this.active) {
      case 'step1':
        this.step1 = 'active';
        this.step2 = '';
        this.step3 = '';
        break;
      case 'step2':
        this.step1 = 'complete';
        this.step2 = 'active';
        this.step3 = '';
        break;
      case 'step3':
        this.step1 = 'complete';
        this.step2 = 'complete';
        this.step3 = 'active';
        break;
    }
  }

}
