{namespace vh=Newland\NeosViewHelpers\ViewHelpers}
<f:if condition="{pagination.count.pages} > 1">
    <nav class="tb-pagination" data-toubiz-pagination>
        <ul class="tb-pagination__list">
            <li class="tb-pagination__item">
                <a 
                    data-toubiz-pagination-prev
                    {f:if(condition: pagination.isFirst, then: 'disabled')}>

                    <svg class="c-icon">
                        <use xlink:href="#icon-backward"/>
                    </svg>
                </a>
            </li>
            <f:for each="{vh:pagination.items(pagination: pagination)}" as="item">
                <li class="tb-pagination__item">
                    <a 
                        href="#0"
                        {f:if(condition: '{item} == {pagination.page}', then: 'aria-current="page"')}
                        data-toubiz-pagination-page="{item}">

                        {item}
                    </a>
                </li>
            </f:for>
            <li class="tb-pagination__item">
                <a 
                    href="#0"
                    data-toubiz-pagination-next
                    {f:if(condition: pagination.isLast, then: 'disabled')}>

                    <svg class="c-icon">
                        <use xlink:href="#icon-forward"/>
                    </svg>
                </a>
            </li>
        </ul>
    </nav>
</f:if>
