<% const p = typeof pagination !== 'undefined' ? pagination : null; %>
<% const sizes = typeof pageSizes !== 'undefined' ? pageSizes : [10, 25, 50, 100]; %>
<% if (p) { %>
<div class="card-header admin-pagination-header d-flex flex-wrap align-items-center justify-content-between gap-2 py-2">
  <div class="d-flex align-items-center gap-2">
    <label class="text-secondary small mb-0" for="adminPageSize">Show</label>
    <select id="adminPageSize" class="form-select form-select-sm admin-page-size-select" style="width:auto" data-base-path="<%= typeof listingPath !== 'undefined' ? listingPath : '' %>" data-extra="<%= typeof listingExtraQuery !== 'undefined' ? listingExtraQuery : '' %>">
      <% sizes.forEach(function(size) { %>
      <option value="<%= size %>" <%= p.limit === size ? 'selected' : '' %>><%= size %></option>
      <% }); %>
    </select>
    <span class="text-secondary small">entries</span>
  </div>
</div>
<% } %>
