<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
    xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
    data-namespace-typo3-fluid="true"
>
<f:if condition="{paginator.numberOfPages} > 1">
    <nav class="pagination-wrap">
        <ul class="pagination">
            <f:if condition="{pagination.previousPageNumber} && {pagination.previousPageNumber} >= {pagination.firstPageNumber}">
                <f:then>
                    <li class="page-item">
                        <a href="{f:be.uri(route:'webhooks_management', parameters: '{demand: demand.parameters, orderField: demand.orderField, orderDirection: demand.orderDirection, page: 1}')}" title="{f:translate(key:'LLL:EXT:webhooks/Resources/Private/Language/locallang_module_webhooks.xlf:pagination.first')}" class="page-link">
                            <core:icon identifier="actions-view-paging-first" />
                        </a>
                    </li>
                    <li class="page-item">
                        <a href="{f:be.uri(route:'webhooks_management', parameters: '{demand: demand.parameters, orderField: demand.orderField, orderDirection: demand.orderDirection, page: pagination.previousPageNumber}')}" title="{f:translate(key:'LLL:EXT:webhooks/Resources/Private/Language/locallang_module_webhooks.xlf:pagination.previous')}" class="page-link">
                            <core:icon identifier="actions-view-paging-previous" />
                        </a>
                    </li>
                </f:then>
                <f:else>
                    <li class="page-item disabled">
                        <span class="page-link">
                            <core:icon identifier="empty-empty"/>
                        </span>
                    </li>
                    <li class="page-item disabled">
                        <span class="page-link">
                            <core:icon identifier="empty-empty"/>
                        </span>
                    </li>
                </f:else>
            </f:if>
            <li class="page-item">
                <span class="page-link">
                    <f:translate key="LLL:EXT:webhooks/Resources/Private/Language/locallang_module_webhooks.xlf:pagination.records" /> {pagination.startRecordNumber} - {pagination.endRecordNumber}
                </span>
            </li>
            <li class="page-item">
                <span class="page-link">
                    <f:translate key="LLL:EXT:webhooks/Resources/Private/Language/locallang_module_webhooks.xlf:pagination.page" />
                    <form
                        class="form-inline"
                        data-global-event="submit"
                        data-action-navigate="$form=~s/$value/"
                        data-navigate-value="{f:be.uri(route:'webhooks_management', parameters: '{demand: demand.parameters, orderField: demand.orderField, orderDirection: demand.orderDirection, page: \'$[value]\'}')}"
                        data-value-selector="input[name='paginator-target-page']">
                        <input
                            min="{pagination.firstPageNumber}"
                            max="{pagination.lastPageNumber}"
                            data-number-of-pages="{paginator.numberOfPages}"
                            name="paginator-target-page"
                            class="form-control form-control-sm paginator-input"
                            size="5"
                            value="{paginator.currentPageNumber}"
                            type="number"
                        />
                    </form>
                    / {pagination.lastPageNumber}
                </span>
            </li>

            <f:if condition="{pagination.nextPageNumber} && {pagination.nextPageNumber} <= {pagination.lastPageNumber}">
                <f:then>
                    <li class="page-item">
                        <a href="{f:be.uri(route:'webhooks_management', parameters: '{demand: demand.parameters, orderField: demand.orderField, orderDirection: demand.orderDirection, page: pagination.nextPageNumber}')}" title="{f:translate(key:'LLL:EXT:webhooks/Resources/Private/Language/locallang_module_webhooks.xlf:pagination.next')}" class="page-link">
                            <core:icon identifier="actions-view-paging-next" />
                        </a>
                    </li>
                    <li class="page-item">
                        <a href="{f:be.uri(route:'webhooks_management', parameters: '{demand: demand.parameters, orderField: demand.orderField, orderDirection: demand.orderDirection, page: pagination.lastPageNumber}')}" title="{f:translate(key:'LLL:EXT:webhooks/Resources/Private/Language/locallang_module_webhooks.xlf:pagination.next')}" class="page-link">
                            <core:icon identifier="actions-view-paging-last" />
                        </a>
                    </li>
                </f:then>
                <f:else>
                    <li class="page-item disabled">
                        <span class="page-link">
                            <core:icon identifier="empty-empty"/>
                        </span>
                    </li>
                    <li class="page-item disabled">
                        <span class="page-link">
                            <core:icon identifier="empty-empty"/>
                        </span>
                    </li>
                </f:else>
            </f:if>
            <li class="page-item">
                <a href="{f:be.uri(route:'webhooks_management', parameters: '{demand: demand.parameters, orderField: demand.orderField, orderDirection: demand.orderDirection, page: paginator.currentPageNumber}')}" title="{f:translate(key:'LLL:EXT:webhooks/Resources/Private/Language/locallang_module_webhooks.xlf:pagination.refresh')}" class="page-link">
                    <core:icon identifier="actions-refresh" />
                </a>
            </li>
        </ul>
    </nav>
</f:if>
</html>
