import { Pipe, PipeTransform } from '@angular/core';
import { Gender } from '@swagger/crm';

@Pipe({
  name: 'gender',
})
export class GenderPipe implements PipeTransform {
  readonly genderMap = {
    2: 'Herr',
    4: 'Frau',
  };

  transform(value: Gender): string {
    return this.genderMap[value] || '';
  }
}
