{% if app.user is not empty and app.user.customer is not empty and app.user.customer.addresses|length > 0 %}
    <div class="ui fluid floating dropdown labeled search icon button address-book-select" {{ sylius_test_html_attribute('address-book') }}>
        <i class="book icon"></i>
        <span class="text">{{ 'sylius.ui.select_address_from_book'|trans }}</span>
        <div class="menu">
            {% for address in app.user.customer.addresses %}
                <div class="item" {{ sylius_test_html_attribute('address-book-item') }}
                     data-id="{{ address.id }}"
                     data-first-name="{{ address.firstName }}"
                     data-last-name="{{ address.lastName }}"
                     data-company="{{ address.company }}"
                     data-street="{{ address.street }}"
                     data-country-code="{{ address.countryCode }}"
                     data-province-code="{{ address.provinceCode }}"
                     data-province-name="{{ address.provinceName }}"
                     data-city="{{ address.city }}"
                     data-postcode="{{ address.postcode }}"
                     data-phone-number="{{ address.phoneNumber }}"
                >
                    <strong>{{ address.firstName }} {{ address.lastName }}</strong>, {{ address.street }}, {{ address.city }} {{ address.postcode }}, {{ address.countryCode|sylius_country_name }}
                </div>
            {% endfor %}
        </div>
    </div>
{% endif %}
