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

@Pipe({
  name: 'branchAddress',
  standalone: false,
})
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}`;
    }
  }
}
