{#
 # For the full copyright and license information, please view the
 # docs/licenses/LICENSE.txt file that was distributed with this source code.
 #}

<div class="card customer-addresses-card">
  <h3 class="card-header">
    <i class="material-icons">location_on</i>
    {{ 'Addresses'|trans({}, 'Admin.Global') }}
    <span class="badge badge-primary rounded">{{ customerAddressGrid.data.records_total }}</span>

    <a href="{{ getAdminLink('AdminAddresses', true, {id_customer: customerInformation.customerId.value, addaddress: 1, back: app.request.uri}) }}" class="tooltip-link float-right"
    data-toggle="pstooltip" title="" data-placement="top" data-original-title="{{ 'Add'|trans({}, 'Admin.Actions') }}">
      <i class="material-icons">add_circle</i>
    </a>
  </h3>

  <div class="card-body">
    {% if customerAddressGrid.data.records_total > 0 %}
      {{ include('@PrestaShop/Admin/Common/Grid/grid.html.twig', {grid: customerAddressGrid}) }}
    {% else %}
      <div class="text-center">
        <p class="text-muted mb-2">
          {{ '%firstname% %lastname% has not registered any addresses yet'|trans({'%firstname%': customerInformation.personalInformation.firstName, '%lastname%': customerInformation.personalInformation.lastName}, 'Admin.Orderscustomers.Feature') }}
        </p>
        <a class="btn btn-primary" href="{{ getAdminLink('AdminAddresses', true, {id_customer: customerInformation.customerId.value, addaddress: 1, back: app.request.uri}) }}">
          <i class="material-icons">add_circle</i>
          {{ 'Create address'|trans({}, 'Admin.Global') }}
        </a>
      </div>
    {% endif %}
  </div>
</div>
