@let r = receipt();

@if (r) {
  <ui-item-row-data>
    <ui-item-row-data-row>
      <ui-item-row-data-label>Belegdatum:</ui-item-row-data-label>
      <ui-item-row-data-value>
        {{ (r.printedDate | date: 'dd.MM.yyyy | HH:mm') + ' Uhr' }}
      </ui-item-row-data-value>
    </ui-item-row-data-row>
    <ui-item-row-data-row>
      <ui-item-row-data-label>Belegart:</ui-item-row-data-label>
      <ui-item-row-data-value>
        {{ r.receiptType | omsReceiptTypeTranslation }}
      </ui-item-row-data-value>
    </ui-item-row-data-row>
    <ui-item-row-data-row>
      <ui-item-row-data-label>Vorgangs-ID:</ui-item-row-data-label>
      <ui-item-row-data-value>
        {{ r.order?.data?.orderNumber }}
      </ui-item-row-data-value>
    </ui-item-row-data-row>
    <ui-item-row-data-row>
      <ui-item-row-data-label>Bestelldatum:</ui-item-row-data-label>
      <ui-item-row-data-value>
        {{ (r.order?.data?.orderDate | date: 'dd.MM.yyyy | HH:mm') + ' Uhr' }}
      </ui-item-row-data-value>
    </ui-item-row-data-row>
    @if (r.buyer?.address; as address) {
      <ui-item-row-data-row>
        <ui-item-row-data-label>Anschrift:</ui-item-row-data-label>
        <ui-item-row-data-value>
          <div>{{ buyerName() }}</div>
          <div>{{ address.street }} {{ address.streetNumber }}</div>
          <div>{{ address.zipCode }} {{ address.city }}</div>
        </ui-item-row-data-value>
      </ui-item-row-data-row>
    }

    @if (r.shipping?.address; as address) {
      <ui-item-row-data-row>
        <ui-item-row-data-label>Lieferanschrift:</ui-item-row-data-label>
        <ui-item-row-data-value>
          <div>{{ shippingName() }}</div>
          <div>{{ address.street }} {{ address.streetNumber }}</div>
          <div>{{ address.zipCode }} {{ address.city }}</div>
        </ui-item-row-data-value>
      </ui-item-row-data-row>
    }
  </ui-item-row-data>
}
