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

/** @var $block \Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup */
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
?>

<div id="system_messages_list" data-role="system_messages_list"
     title="<?= $block->escapeHtmlAttr($block->getPopupTitle()) ?>">
    <ul class="message-system-list messages">
        <?php foreach ($block->getUnreadMessages() as $message): ?>
            <li class="message message-warning <?= $block->escapeHtmlAttr($block->getItemClass($message)) ?>">
                <?= $block->escapeHtml($message->getText()) ?>
            </li>
        <?php endforeach;?>
    </ul>
</div>
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', '#system_messages_list'); ?>

<script type="text/x-magento-init">
    {
        "[data-role=system_messages_list]": {
            "Magento_AdminNotification/js/system/messages/popup": {
                "class":"modal-system-messages ui-popup-message"
            }
        }
    }
</script>
