<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="{{ artistId }}" id="groupTypeId" />
  <input type="hidden" value="{{ groupLevelOrderBy }}" id="groupLevelOrderBy" />
  <input type="hidden" value="{{ groupLevelPageNo }}" id="groupLevelPageNo" />

  <div class="py-5">
    <div class="row g-5">
      <div class="col-lg-12 wow">
        {% if artist_details|length > 0 %}
          <h1 class="font-normal">
            {{ artist_details['ArtistFirst'] ?? '' }}
            {{ artist_details['ArtistLast'] ?? '' }}
          </h6>

          <p class="mb-4">
            <span>
              {{ artist_details['ArtistYears'] ?? '' }}
            </span>
          </p>
          <p class="mb-4">
            {{ artist_details['ArtistNationality'] ?? '' }}
            {{ artist_details['ArtistLocale'] ? '(' ~ artist_details['ArtistLocale'] ~ ')' : '' }}
          </p>
          <p class="mb-4">
            {{ artist_details['ArtistBio']|raw }}
          </p>
        {% endif %}
      </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 artist-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") }}
        {% endfor %}
      </div>

      <div class="cs-custom-pagination d-flex" id="groupLevelPagingData">
        {{ customPaginationForGroupLevelObjects(artistId, 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>
