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

@Pipe({
  name: 'branchAddress',
})
export class BranchAddressPipe implements PipeTransform {
  transform(branch: BranchDTO, ...args: any[]): any {
    if (branch) {
      return `${branch?.address?.street} ${branch?.address?.streetNumber}, ${branch?.address?.zipCode} ${branch?.address?.city}`;
    }
  }
}
