import { inject, Pipe, PipeTransform } from '@angular/core';
import { ReceiptTypeTranslationService } from './receipt-type-translation.service';
import { ReceiptType } from '@isa/oms/data-access';

@Pipe({
  name: 'omsReceiptTypeTranslation',
})
export class ReceiptTypeTranslationPipe implements PipeTransform {
  readonly translationService = inject(ReceiptTypeTranslationService);

  transform(value: ReceiptType = ReceiptType.NotSet): string {
    return this.translationService.translate(value);
  }
}
