import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import { AddressComponent } from '@isa/shared/address';
import { OrderConfiramtionStore } from '../reward-order-confirmation.store';
import { getCustomerName } from '@isa/crm/data-access';

@Component({
  selector: 'checkout-order-confirmation-addresses',
  templateUrl: './order-confirmation-addresses.component.html',
  styleUrls: ['./order-confirmation-addresses.component.css'],
  changeDetection: ChangeDetectionStrategy.OnPush,
  imports: [AddressComponent],
})
export class OrderConfirmationAddressesComponent {
  getCustomerName = getCustomerName;

  #store = inject(OrderConfiramtionStore);

  payers = this.#store.payers;

  shippingAddresses = this.#store.shippingAddresses;

  hasDeliveryOrderTypeFeature = this.#store.hasDeliveryOrderTypeFeature;

  targetBranches = this.#store.targetBranches;

  hasTargetBranchFeature = this.#store.hasTargetBranchFeature;
}
