import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core';
import { File } from '@red/domain';
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';

@Component({
    selector: 'redaction-processing-indicator [file]',
    templateUrl: './processing-indicator.component.html',
    styleUrls: ['./processing-indicator.component.scss'],
    changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ProcessingIndicatorComponent implements OnChanges {
    tooltip: string;
    @Input() file: File;

    ngOnChanges() {
        this.tooltip = this.file.isInitialProcessing ? _('file-status.initial-processing') : _('file-status.re-processing');
    }
}
