import { Component , Input , OnInit , OnDestroy , ViewEncapsulation , HostBinding } from '@angular/core' ; import { ProgressBarService } from '../progress-bar.service' ; import { Observable , of , ReplaySubject } from 'rxjs' ; import { ProgressBarState } from './progress-bar.types' ; @ Component ( { selector : 'cmdb-progress-bar' , templateUrl : './progress-bar.component.html' , styleUrls : [ './progress-bar.component.scss' ] , encapsulation : ViewEncapsulation . Emulated } ) export class ProgressBarComponent { /**
     * Z Index value.
     */ @ HostBinding ( 'style.z-index' ) @ Input ( ) public zIndex : number = 4000 ; /**
     * Bar height in px.
     */ @ Input ( ) public height : number = 4 ; /**
     * Reference name for ProgressBarService.
     */ @ Input ( ) public ref : string = 'default' ; /**
     * Displayed fixed on top of page.
     */ @ Input ( ) public fixed : boolean = true ; constructor ( private progressBarService ) { } /**
     * Get the progress bar state as observable.
     */ public get state ( ) : Observable < ProgressBarState > { return this . progressBarService . getInstance ( this . ref ) . state ; } }