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

// @codingStandardsIgnoreFile

/**
 * @var \Magento\Customer\Block\Adminhtml\Edit\Tab\View\PersonalInfo $block
 */

$lastLoginDateAdmin = $block->getLastLoginDate();
$lastLoginDateStore = $block->getStoreLastLoginDate();

$createDateAdmin = $block->getCreateDate();
$createDateStore = $block->getStoreCreateDate();
?>

<div class="fieldset-wrapper customer-information">
    <div class="fieldset-wrapper-title">
        <span class="title"><?php echo $block->escapeHtml(__('Personal Information')) ?></span>
    </div>
    <table class="admin__table-secondary">
        <tbody>
        <?php echo $block->getChildHtml(); ?>
        <tr>
            <th><?php echo $block->escapeHtml(__('Last Logged In:')) ?></th>
            <td><?php echo $block->escapeHtml($lastLoginDateAdmin) ?> (<?php echo $block->escapeHtml($block->getCurrentStatus()) ?>)</td>
        </tr>
        <?php if ($lastLoginDateAdmin != $lastLoginDateStore): ?>
        <tr>
            <th><?php echo $block->escapeHtml(__('Last Logged In (%1):', $block->getStoreLastLoginDateTimezone())) ?></th>
            <td><?php echo $block->escapeHtml($lastLoginDateStore) ?> (<?php echo $block->escapeHtml($block->getCurrentStatus()) ?>)</td>
        </tr>
        <?php endif; ?>
        <tr>
            <th><?php echo $block->escapeHtml(__('Account Lock:')) ?></th>
            <td><?php echo $block->escapeHtml($block->getAccountLock()) ?></td>
        </tr>
        <tr>
            <th><?php echo $block->escapeHtml(__('Confirmed email:')) ?></th>
            <td><?php echo $block->escapeHtml($block->getIsConfirmedStatus()) ?></td>
        </tr>
        <tr>
            <th><?php echo $block->escapeHtml(__('Account Created:')) ?></th>
            <td><?php echo $block->escapeHtml($createDateAdmin) ?></td>
        </tr>
        <?php if ($createDateAdmin != $createDateStore): ?>
            <tr>
                <th><?php echo $block->escapeHtml(__('Account Created on (%1):', $block->getStoreCreateDateTimezone())) ?></th>
                <td><?php echo $block->escapeHtml($createDateStore) ?></td>
            </tr>
        <?php endif; ?>
        <tr>
            <th><?php echo $block->escapeHtml(__('Account Created in:')) ?></th>
            <td><?php echo $block->escapeHtml($block->getCreatedInStore()) ?></td>
        </tr>
        <tr>
            <th><?php echo $block->escapeHtml(__('Customer Group:')) ?></th>
            <td><?php echo $block->escapeHtml($block->getGroupName()) ?></td>
        </tr>
        </tbody>
    </table>
    <address>
        <strong><?php echo $block->escapeHtml(__('Default Billing Address')) ?></strong>
        <br/>
        <?php echo $block->getBillingAddressHtml() ?>
    </address>

</div>
