<?php
/**
 * Copyright © Magefan (support@magefan.com). All rights reserved.
 * Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).
 *
 * Glory to Ukraine! Glory to the heroes!
 */
?>
<?php
/**
 * Blog available for to get notification
 *
 * @var $block \Magefan\Blog\Block\Adminhtml\System\Config\Form\UpdateInfo
 */
?>

<?php if ($block->needToUpdate() && \Magefan\Community\Model\UrlChecker::showUrl($block->getUrl())) { ?>
    <div class="messages">
        <div class="message message-notice notice">
            <div data-ui-id="messages-message-error">
                <?php
                    $url1 = 'https://magefan.com/blog/update-magefan-blog-extension';
                    $url2 = 'https://magefan.com/magento2-blog-extension';
                    $url3 = 'https://magefan.com/contact';
                ?>
                <?= /*@noEscape*/ __(
                    'Your Blog Extension is out of date. <a href="%1" target="_blank">Use this guide</a> to update it to <strong>version %2</strong>
                     via composer or download the new version archive from the 
                     <a href="%3" target="_blank">Magefan Store</a>.
                     Please <a href="%4"   target="_blank">contact</a> 
                     the Magefan team if you have any questions or need help with an update.',
                    $url1,
                    $block->escapeHtml($block->getLatestVersion()),
                    $url2,
                    $url3
                );
                ?>
            </div>
        </div>
    </div>
<?php } ?>


