<?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 post list lazyload template
 *
 * @var $block \Magefan\Blog\Block\Post\PostList\Toolbar\Pager
 */
?>
<?php if ($block->useLazyload()) { ?>
    <?php
        $config = $block->getLazyloadConfig([
            'trigger_element' => '.mbblog-lazyload-trigger'
        ]);
    ?>
    <div class="mfblog-autoloader"
         data-mage-init='{"<?= /*@noEscape*/ $block->getLazyloadJs() ?>" : <?= /*@noEscape*/ $config ?>}'>
        <button class="mbblog-lazyload-trigger mfblog-hide-onload action primary"
                title="<?= $block->escapeHtml(__('See more')) ?>"
                type="button">
            <span><?= $block->escapeHtml(__('See more')) ?></span>
        </button>
        <img class="posts-loader mfblog-show-onload"
             src="<?= $block->escapeUrl($block->getViewFileUrl('images/loader-2.gif')) ?>"
             alt="<?= $block->escapeHtml(__('Posts loader')) ?>" />
    </div>
<?php } ?>