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

@Pipe({
  name: 'purchaseOptionIcon',
})
export class PurchaseOptionIconPipe implements PipeTransform {
  readonly purchaseOptionIcons = {
    'take-away': 'shopping_bag',
    'pick-up': 'box_out',
    delivery: 'truck',
    'dig-delivery': 'truck',
    'b2b-delivery': 'truck_b2b',
    download: 'download',
  };

  transform(value: any): any {
    return this.purchaseOptionIcons[value] || '';
  }
}
