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

/**
 * @var $block \Magento\Framework\View\Element\Messages
 * @var $viewModel \Magento\AdminAdobeIms\ViewModel\MessageViewModel
 */
$viewModel = $block->getMessageViewModel();
?>

<?php if ($block->getMessageCollection()->getCount() !== 0): ?>
<div class="adobe-ims-error-message-wrapper">
    <?php foreach ($block->getMessageTypes() as $messageType): ?>
        <?= $viewModel->getMessagesHtml($block->getMessagesByType($messageType)) ?>
    <?php endforeach; ?>
</div>
<?php endif; ?>
