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

// @codingStandardsIgnoreFile
/** @var Magento\Customer\Block\Account\Customer $block */
?>
<?php if ($block->customerLoggedIn()): ?>
    <li class="customer-welcome">
        <div class="greet welcome" data-bind="scope: 'customer'">
            <!-- ko if: customer().fullname  -->
            <span data-bind="text: new String('<?php echo $block->escapeHtml(__('Hello! %1', '%1')); ?>').replace('%1', customer().firstname)"></span>
            <!-- /ko -->
        </div>
        <script type="text/x-magento-init">
        {
            "*": {
                "Magento_Ui/js/core/app": {
                    "components": {
                        "customer": {
                            "component": "Magento_Customer/js/view/customer"
                        }
                    }
                }
            }
        }
        </script>
        <?php if ($block->getChildHtml()): ?>
            <div class="customer-menu" data-target="dropdown">
                <?= $block->getChildHtml() ?>
            </div>
        <?php endif; ?>
    </li>
<?php endif; ?>
