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

// @codingStandardsIgnoreFile

/** @var \Magento\Customer\Block\Address\Book $block */
?>
<div class="block block-addresses-default">
    <div class="block-title"><strong><?= $block->escapeHtml(__('Default Addresses')) ?></strong></div>
    <div class="block-content">
        <?php if ($_pAddsses = $block->getDefaultBilling()): ?>
            <div class="box box-address-billing">
                <strong class="box-title">
                    <span><?= $block->escapeHtml(__('Default Billing Address')) ?></span>
                </strong>
                <div class="box-content">
                    <address>
                        <?= $block->getAddressHtml($block->getAddressById($_pAddsses)) ?>
                    </address>
                </div>
                <div class="box-actions">
                    <a class="action edit" href="<?= $block->escapeUrl($block->getAddressEditUrl($_pAddsses)) ?>">
                        <span><?= $block->escapeHtml(__('Change Billing Address')) ?></span>
                    </a>
                </div>
            </div>
        <?php else: ?>
            <div class="box box-billing-address">
                <strong class="box-title"><span><?= $block->escapeHtml(__('Default Billing Address')) ?></span></strong>
                <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">
                <strong class="box-title">
                    <span><?= $block->escapeHtml(__('Default Shipping Address')) ?></span>
                </strong>
                <div class="box-content">
                    <address>
                        <?= $block->getAddressHtml($block->getAddressById($_pAddsses)) ?>
                    </address>
                </div>
                <div class="box-actions">
                    <a class="action edit" href="<?= $block->escapeUrl($block->getAddressEditUrl($_pAddsses)) ?>">
                        <span><?= $block->escapeHtml(__('Change Shipping Address')) ?></span>
                    </a>
                </div>
            </div>
        <?php else: ?>
            <div class="box box-shipping-address">
                <strong class="box-title"><span><?= $block->escapeHtml(__('Default Shipping Address')) ?></span></strong>
                <div class="box-content">
                    <p><?= $block->escapeHtml(__('You have no default shipping address in your address book.')) ?></p>
                </div>
            </div>
        <?php endif ?>
    </div>
</div>
