<?php
/**
 * Maho
 *
 * @category    design
 * @package     base_default
 * @copyright   Copyright (c) 2006-2020 Magento, Inc. (https://magento.com)
 * @copyright   Copyright (c) 2021-2024 The OpenMage Contributors (https://openmage.org)
 * @copyright   Copyright (c) 2024 Maho (https://mahocommerce.com)
 * @license     https://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

/** @var Mage_Customer_Block_Account_Dashboard_Info $this */
?>
<div class="col2-set">
    <div class="col-1">
        <div class="box">
            <div class="box-title">
                <h3><?= $this->__('Contact Information') ?></h3>
                <a href="<?= $this->getUrl('customer/account/edit') ?>"><?= $this->__('Edit') ?></a>
            </div>
            <div class="box-content">
                <p>
                    <?= $this->escapeHtml($this->getCustomer()->getName()) ?><br />
                    <?= $this->escapeHtml($this->getCustomer()->getEmail()) ?><br />
                    <a href="<?= $this->getChangePasswordUrl() ?>"><?= $this->__('Change Password') ?></a>
                </p>
            </div>
        </div>
    </div>
    <?php if( $this->isNewsletterEnabled() ): ?>
    <div class="col-2">
        <div class="box">
            <div class="box-title">
                <h3><?= $this->__('Newsletters') ?></h3>
                <a href="<?= $this->getUrl('newsletter/manage') ?>"><?= $this->__('Edit') ?></a>
            </div>
            <div class="box-content">
                <p>
                    <?php if( $this->getIsSubscribed() ): ?>
                        <?= $this->__("You are currently subscribed to 'General Subscription'.") ?>
                    <?php else: ?>
                        <?= $this->__('You are currently not subscribed to any newsletter.') ?>
                    <?php endif ?>
                </p>
            </div>
        </div>
        <?php /* Extensions placeholder */ ?>
        <?= $this->getChildHtml('customer.account.dashboard.info.extra') ?>
    </div>
    <?php endif ?>
</div>
