<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

/** @var \Magento\Customer\Block\Address\Book $block */
?>
<div class="line">
    <div class="block block-addresses-default col-des-6 col-tb-6 col-mb-12">
        <div class="block-content line">
            <?php if ($_pAddsses = $block->getDefaultBilling()) : ?>
                <div class="box box-address-billing col-des-12 col-tb-12 col-mb-12">
                    <div class="block-title-account">
                        <h3><?= $block->escapeHtml(__('Default Billing Address')) ?></h3>
                    </div>
                    <div class="box-content">
                        <address>
                            <?= $block->getAddressHtml($block->getAddressById($_pAddsses)) ?>
                        </address>
                    </div>
                    <div class="box-actions margin-top10">
                        <a class="action btn btn-xs btn-secondary edit" href="<?= $block->escapeUrl($block->getAddressEditUrl($_pAddsses)) ?>">
                            <span><?= $block->escapeHtml(__('Edit')) ?></span>
                        </a>
                    </div>
                </div>
            <?php else : ?>
                <div class="box box-billing-address col-des-12 col-tb-12 col-mb-12">
                    <div class="block-title-account">
                        <h3><?= $block->escapeHtml(__('Default Billing Address')) ?></h3>
                    </div>
                    <div class="box-content">
                        <p><?= $block->escapeHtml(__('You have no default billing address in your address book.')) ?></p>
                    </div>
                </div>
            <?php endif ?>

            <?php if ($_pAddsses = $block->getDefaultShipping()) : ?>
                <div class="box box-address-shipping col-des-12 col-tb-12 col-mb-12">
                    <div class="block-title-account">
                        <h3><?= $block->escapeHtml(__('Default Shipping Address')) ?></h3>
                    </div>
                    <div class="box-content">
                        <address>
                            <?= $block->getAddressHtml($block->getAddressById($_pAddsses)) ?>
                        </address>
                    </div>
                    <div class="box-actions margin-top10">
                        <a class="action btn btn-xs btn-secondary edit" href="<?= $block->escapeUrl($block->getAddressEditUrl($_pAddsses)) ?>">
                            <span><?= $block->escapeHtml(__('Edit')) ?></span>
                        </a>
                    </div>
                </div>
            <?php else : ?>
                <div class="box box-shipping-address col-des-12 col-tb-12 col-mb-12">
                    <div class="block-title-account">
                        <h3><?= $block->escapeHtml(__('Default Shipping Address')) ?></h3>
                    </div>
                    <div class="box-content">
                        <p><?= $block->escapeHtml(__('You have no default shipping address in your address book.')) ?></p>
                    </div>
                </div>
            <?php endif ?>
        </div>
    </div>
    <div class="block block-addresses-list col-des-6 col-tb-6 col-mb-12">
        <div class="block-content line">
            <?php if ($_pAddsses = $block->getAdditionalAddresses()) : ?>
                <div class="box box-address-billing col-des-12 col-tb-12 col-mb-12">
                    <div class="block-title-account">
                        <h3><?= $block->escapeHtml(__('Additional Address Entries')) ?></h3>
                    </div>
                    <div class="box-content">
                        <?php if ($_pAddsses = $block->getAdditionalAddresses()): ?>
                            <ol class="items addresses line">
                                <?php foreach ($_pAddsses as $_address): ?>
                                    <li class="item col-des-12 col-tb-12 col-mb-12">
                                        <address>
                                            <?php echo $block->getAddressHtml($_address) ?><br />
                                        </address>
                                        <div class="item actions margin-top10">
                                            <a class="action edit btn btn-xs btn-primary" href="<?php /* @escapeNotVerified */ echo $block->getUrl('customer/address/edit', ['id' => $_address->getId()]) ?>"><span><?php /* @escapeNotVerified */ echo __('Edit') ?></span></a>
                                            <a class="action delete btn btn-xs btn-secondary margin-left10" href="#" role="delete-address" data-address="<?= $block->escapeHtmlAttr($_address->getId()) ?>"><span><?= $block->escapeHtml(__('Delete')) ?></span></a>
                                        </div>
                                    </li>
                                <?php endforeach; ?>
                            </ol>
                        <?php else: ?>
                            <p class="empty"><?php /* @escapeNotVerified */ echo __('You have no other address entries in your address book.') ?></p>
                        <?php endif ?>
                    </div>
                </div>
            <?php else : ?>
                <div class="box box-billing-address col-des-12 col-tb-12 col-mb-12">
                    <div class="block-title-account">
                        <h3><?= $block->escapeHtml(__('Additional Address Entries')) ?></h3>
                    </div>
                    <div class="box-content">
                        <p><?= $block->escapeHtml(__('You have no default billing address in your address book.')) ?></p>
                    </div>
                </div>
            <?php endif ?>

        </div>
    </div>
</div>

