import { Pipe, PipeTransform } from '@angular/core'; import { PaymentType } from '@core/typings/payment.typing'; import { PaymentProcessingService } from '@features/payment-processing/payment-processing.service'; @Pipe({ name: 'gcPaymentTypeToText' }) export class PaymentTypeToTextPipe implements PipeTransform { constructor ( private paymentProcessingService: PaymentProcessingService ) { } transform (paymentType: PaymentType) { return this.paymentProcessingService.translatePaymentType(paymentType); } }