
{% macro renderGallery(j3, context) %}
  {% import _self as self %}
  {% set index = 0 %}
  {% for item in context.items[:context.thumbsLimit] %}

    <div class="{{ j3.classes(item.classes) }}">
       <a {% if item.type != 'link' %}data-gallery="#{{ context.id }} .lightgallery" data-index="{{ index }}"{% set index = index + 1 %}{% endif %} href="{{ item.popup }}" title="{{ item.alt }}">
          {% if j3.settings.get('performanceLazyLoadImagesStatus') %}
            <img src="{{ context.dummy_image }}" data-src="{{ item.thumb }}" alt="{{ item.alt }}" width="{{ context.thumbDimensions.width }}" height="{{ context.thumbDimensions.height }}" class="lazyload"/>
          {% else %}

		  <div class="circle">
  <img  class="instares" src="{{ item.thumb }}" alt="{{ item.alt }}" />
  <svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" style="enable-background:new -580 439 577.9 194;"
     xml:space="preserve">  
    <circle cx="50" cy="50" r="40" />
  </svg>
</div>
        </a> 
          {% endif %}
    </div>
  {% endfor %}
{% endmacro %}
{% import _self as self %}
<div id="{{ id }}" class="{{ j3.classes(classes) }}">
  {% if title %}
    <h3 class="title module-title">{{ title }}</h3>
  {% endif %}
  <div class="module-body">
    {# grid #}
    {% if not carousel %}
      {{ self.renderGallery(j3, _context) }}
    {% endif %}
    {# grid + carousel #}
    {% if carousel %}
      <div class="swiper" data-items-per-row='{{ itemsPerRow|json_encode(constant('JSON_FORCE_OBJECT')) }}' data-options='{{ carouselOptions|json_encode }}'>
        <div class="swiper-container" {% if j3.isRTL() %}dir="rtl"{% endif %}>
          <div class="swiper-wrapper">
            {{ self.renderGallery(j3, _context) }}
          </div>
        </div>
        <div class="swiper-buttons">
          <div class="swiper-button-prev"></div>
          <div class="swiper-button-next"></div>
        </div>
        <div class="swiper-pagination"></div>
      </div>
    {% endif %}
  </div>
  <div class="lightgallery" data-images='{{ images|json_encode|e }}' data-options='{{ options|json_encode }}'></div>
</div>
