<div class="collector-systems-wrapper">

  <input type="hidden" value="{{ nxshowrec }}" id="groupLevelTopCount" />
  <input type="hidden" value="{{ nxshskip }}" id="groupLevelSkipCount" />
  <input type="hidden" value="{{ obj_count }}" id="groupLevelTotalCount" />
  <input type="hidden" value="{{ collectionID }}" id="groupTypeId" />
  <input type="hidden" value="{{ groupLevelOrderBy }}" id="groupLevelOrderBy" />
  <input type="hidden" value="{{ groupLevelPageNo }}" id="groupLevelPageNo" />

  <input type="hidden" value="{{ collectionLeftExtent }}" id="collectionLeftExtent" />
  <input type="hidden" value="{{ collectionRightExtent }}" id="collectionRightExtent" />

  <div class="py-5">
    <div class="row g-5">
      <div class="col-lg-12 wow fadeInDown" data-wow-delay="0.1s">
        <h1 class="font-normal">
          {% if collection_details is defined %}
            {{ collection_details.FullCollectionName | default("") }}
          {% endif %}
        </h1>
      </div>
    </div>

    {% if enable_maps %}
      {# Custom Tabs Block #}
      {% include module_path ~ '/templates/partials/custom-tabs-block.html.twig' %}
    {% endif %}

    <div id="gallery-block" class="py-5">
      <div class="row mb-3">
        <div class="col d-inline-flex">
          <h2 class="font-normal pl-0 m-0">
            Objects
          </h2>
          {% if obj_count > nxshowrec %}
            <h6 class="cs-grouplevel-total-count">
              (
              {{ obj_count }}
              results)
            </h6>
          {% endif %}
        </div>
        <div class="col-auto text-end my-auto d-inline-flex">
          <div class="sort-by-field" id="dlGroupLevelObjectsSortingHtml">
            <span class="sort-by-title me-3">
              Sort By:
            </span>
            <select name="dlGroupLevelObjectsOrderBy" id="dlGroupLevelObjectsOrderBy" class="form-select" onchange="return sortingForGroupLevelObjects('{{ ajaxfor }}',{{ listPageSize }});">
              <option value="Title%20asc">
                Title Asc
              </option>
              <option value="Title%20desc">
                Title Desc
              </option>
              <option value="InventoryNumber%20desc">
                Inventory Number Desc
              </option>
              <option value="InventoryNumber%20asc">
                Inventory Number Asc
              </option>
              <option value="Collection/CollectionName%20desc">
                Collection Name Desc
              </option>
              <option value="Collection/CollectionName%20asc">
                Collection Name Asc
              </option>
              <option value="ObjectDate%20desc">
                Object Date Desc
              </option>
              <option value="ObjectDate%20asc">
                Object Date Asc
              </option>
            </select>
          </div>
          {% include '@collector_systems/templates/search-form.html.twig' %}
        </div>
      </div>

      <div class="card-group row g-5 postList collection-objects-container mt-5" id="groupLevelObjectsData">
        {% for value in object_details %}
          {% set delaytm = (loadsec == 1) ? '0.01s' : ((loadsec == 2) ? '0.03s' : '0.05s') %}
          {{ getObjectslistHtml(value, groupLevelOrderBy, groupLevelPageNo, qSearch, delaytm, "https://cdn.collectorsystems.com/images/noimage300.png") }}
          {% set loadsec = (loadsec == 3) ? 1 : (loadsec + 1) %}
        {% endfor %}
      </div>

      <div class="cs-custom-pagination d-flex" id="groupLevelPagingData">
        {{ customPaginationForGroupLevelObjects(collectionID, ajaxfor, groupLevelPageNo, obj_count, groupLevelOrderBy, qSearch) }}
      </div>
    </div>

    {% if enable_maps %}
      {# Azure Map Block #}
      {% include module_path ~ '/templates/partials/azure-map-block.html.twig' %}
    {% endif %}
  </div>
</div>
