<?php
/**
 * Hyvä Themes - https://hyva.io
 * Copyright © Hyvä Themes 2020-present. All rights reserved.
 * This product is licensed per Magento install
 * See https://hyva.io/license
 */

declare(strict_types=1);

use Magento\Catalog\Block\Product\ProductList\Toolbar;
use Magento\Framework\Escaper;

/** @var Toolbar $block */
/** @var Escaper $escaper */
?>
<p class="toolbar-amount" id="toolbar-amount">
    <?php if ($block->getLastPageNum() > 1): ?>
        <?= $escaper->escapeHtml(
            __(
                '%1 results',
                '<span class="toolbar-number">' . $block->getTotalNum() . '</span>'
            ),
            ['span']
        ) ?>
    <?php elseif ($block->getTotalNum() == 1): ?>
        <?= $escaper->escapeHtml(
            __('%1 results', '<span class="toolbar-number">' . $block->getTotalNum() . '</span>'),
            ['span']
        ) ?>
    <?php else:?>
        <?= $escaper->escapeHtml(
            __('%1 results', '<span class="toolbar-number">' . $block->getTotalNum() . '</span>'),
            ['span']
        ) ?>
    <?php endif; ?>
</p>
