{if $slider.images|count}
   <div class="{$class}">
      <div class="{if $slider.images|count > 1}slider-tns{/if}">
          {foreach $slider.images as $image}
             <div class="item {if $image.custom_data.color == "white"}item-light{/if}"
                  data-tracking-view='{get_gtm_data type='ecommerce' method='PromotionImpression' encode=true data=['slider' => $slider, 'position' => $image@iteration]}'>
                <div class="img">
                   <picture>
                      <source srcset="{get_photo photo=$image.photo size='slider_home_mobile' version="mobile"}" media="(max-width: 543px)">
                      <source srcset="{get_photo photo=$image.photo size='slider_home_tablet' version="tablet"}" media="(max-width: 991px)">
                      <img src="{get_photo photo=$image.photo size='slider_home_double' version="desktop"}" class="img-responsive"
                           alt="{$image.custom_data.title}" width="{$photo_dimensions[0]}"
                           height="{$photo_dimensions[1]}"{if $image@iteration > 1} loading="lazy"{/if}>
                   </picture>
                </div>
                <div class="text {$image.custom_data.color}">
                    {if $image.custom_data.title}
                       <h1 class="title">{$image.custom_data.title|nl2br nofilter}</h1>
                    {/if}
                    {$product = $banner_products.products[$banner_products.id[0]]}
                    {if $image.link}
                       <a href="{$image.link}" class="btn {if $image.custom_data.color != "white"}btn-primary black{else}white-btn{/if}"
                          data-tracking-click='{get_gtm_data encode=true type='ecommerce' method='PromotionClick' data=['slider' => $slider, 'slide' => $image, 'position' => $image@iteration]}'>{$image.custom_data.btn}</a>
                    {/if}
                </div>
             </div>
          {/foreach}
      </div>
   </div>
{/if}
