		{% capture isSliderAvailable %}section{% endcapture %}
{% for block in section.blocks %}
	{% if block.settings.mainitem_slide_image != blank %}
		{% capture isSliderAvailable %}section{% endcapture %}
	{% endif %}
{%endfor%}
{% if isSliderAvailable == 'section' %}
  <div data-section-id="{{ section.id }}" data-section-type="image-slideshow " class="{% if section.settings.is_effect_apply%}no_animation_effect{% else %}animation_effect{% endif %} fxInElement fadeIn fullScreenSlider slickSlider overlayFX space_top_header image_slider_section">

      <ul data-animation_name="{{ section.settings.animation_name }}" data-animation_delay="{{ section.settings.animation_delay }}" data-margin="0" data-full="1"  data-tab="1" data-mob="1" data-auto="{%if section.settings.auto_rotate%}true{%else%}false{%endif%}" class="{% if section.settings.animation_name != 'noeffect' %}scroll_animation {% endif %}" data-timeout="{{section.settings.home_mainitem_auto_speed}}" style="animation-duration: {{ section.settings.animation_duration }};">
        {% assign counter = '' %}
        {% for block in section.blocks %}

        {% capture temp %}{{ counter }}*{% endcapture %}
        {% assign counter = temp %}
        <li>
          <div class="bgImage {% if parallax %}paraOne{% endif %}">
            {% if block.settings.mainitem_slide_image != blank %}
            {% if settings.image_loading_type == 'lazy' %}
              
              <img data-sizes="auto" class="lazyload lazyloadimage blur-up" alt="{{ block.settings.mainitem_slide_image.alt }}" src="{{ block.settings.mainitem_slide_image | img_url: '100x' }}" data-src="{{ block.settings.mainitem_slide_image | img_url: '2000x' }}">
            {% else %}
              <img alt="{{ block.settings.mainitem_slide_image.alt }}" src="{{ block.settings.mainitem_slide_image | img_url: '2000x' }}">
            {% endif %}
            
			{%else%}
            	<img src="{{ 'image-slider.jpg' | asset_url }}" />
            {% endif %}


          </div>
          {% assign hex2rgb_hex = section.settings.color_slideshow_overlay %}
          {% include 'hex2rgb' %}
          <div class="mainitemOverlay" style="background: rgba({{ hex2rgb_r  }},{{ hex2rgb_g  }},{{ hex2rgb_b  }}, {{ section.settings.overlay_opacity }});">
            {% if block.settings.sliderlink != blank %}
              <a href="{{ block.settings.sliderlink }}" class="homepagelinkSlider scroll_link_trigger"></a>
            {% endif %}
            <div class="gridTable">
              <div class="inner flexItem paraTwo">
                <h{{section.settings.heading_tag}} style="color:{{block.settings.mainitem_slide_color}}; font-weight:{{ section.settings.heading_tag_text_style11}};">
                    
                        <a class="image_slider_link scroll_link_trigger" href="{{block.settings.mainitem_slide_link}}" style="font-weight:{{ section.settings.heading_tag_text_style11}}; color:{{block.settings.mainitem_slide_color}};">{{block.settings.mainitem_slide_heading}}</a>
                    
                </h{{section.settings.heading_tag}}>
              </div>
            </div>
          </div>
        </li>
        {%endfor%}
      </ul>
      {%if counter.size > 1%}
        <span class="paraTwo control  prev">
          {%include 'svg-definitions' with 'left-arrow'%}
        </span>
        <span class="paraTwo control next">
          {%include 'svg-definitions' with 'right-arrow'%}
        </span>
      {%endif%}

      

  </div>
{% else %}
	<img src="{{ 'image-slider.jpg' | asset_url }}" />
{%endif%}

{% schema %}
  {
  	"name": "Image Slider",
    "max_blocks": 5,
  	"settings": [
		{
              	"type": "paragraph",
              	"content": "Video Tutorial FR : [Image Slider by Ulrich Vallée](https:\/\/www.ulrichvallee.com\/pages\/image-slider)"
        },
		{
          "type": "checkbox",
          "id": "auto_rotate",
          "label": "Auto rotate between slides"
        },
        {
          "type": "select",
          "id": "home_mainitem_auto_speed",
          "label": "Rotation interval",
          "options": [
			{
              "value": "3000",
              "label": "3 seconds"
            },
            {
              "value": "5000",
              "label": "5 seconds"
            },
            {
              "value": "7000",
              "label": "7 seconds"
            },
            {
              "value": "10000",
              "label": "10 seconds"
            }
          ]
        },
        {
          "type": "color",
          "id": "color_slideshow_overlay",
          "label": "Overlay",
          "default": "#111"
        },
        {
          "type": "select",
          "id": "overlay_opacity",
          "label": "Overlay opacity",
          "options": [
            {
              "value": "0",
              "label": "Transparent"
            },
            {
              "value": ".1",
              "label": "10%"
            },
            {
              "value": ".2",
              "label": "20%"
            },
            {
              "value": ".3",
              "label": "30%"
            },
            {
              "value": ".4",
              "label": "40%"
            },
            {
              "value": ".5",
              "label": "50%"
            },
            {
              "value": ".6",
              "label": "60%"
            },
            {
              "value": ".7",
              "label": "70%"
            },

            {
              "value": ".8",
              "label": "80%"
            },
            {
              "value": ".9",
              "label": "90%"
            },
            {
              "value": "1",
              "label": "100%"
            }
          ]
        },
		{
          "type": "select",
          "id": "heading_tag",
          "label": "Heading Tag",
          "default":"2",
          "options": [
            {
              "value": "1",
              "label": "H1"
            },
            {
              "value": "2",
              "label": "H2"
            },
            {
              "value": "3",
              "label": "H3"
            },
            {
              "value": "4",
              "label": "H4"
            },
            {
              "value": "5",
              "label": "H5"
            },
            {
              "value": "6",
              "label": "H6"
            }
          ]
        },
		{
                "type": "select",
                "id": "heading_tag_text_style11",
                "label": "Heading Font Style",
                "options": [
                        {
                          "value": "300",
                          "label": "Lighter",
                          "group": "Font Style"
                        },
                        {
                          "value": "400",
                          "label": "Normal",
                          "group": "Font Style"
                        },
                        {
                          "value": "600",
                          "label": "Bold",
                          "group": "Font Style"
                        },
                        {
                          "value": "700",
                          "label": "Bolder",
                          "group": "Font Style"
                        }
                    ],
				"default": "600"
              },
              {
                  "type":"checkbox",
                  "id":"is_effect_apply",
                  "label":"Apply Section Effect",
                  "default":false
              },
              {
                  "type": "select",
                  "id": "animation_name",
                  "label": "Animation Effect",
                  "default": "noeffect",
                  "options": [
                    {
                      "label": "No Effect",
                      "value": "noeffect"
                    },
                    {
                      "label": "bounce",
                      "value": "bounce"
                    },
                    {
                      "label": "flash",
                      "value": "flash"
                    },
                    {
                      "label": "pulse",
                      "value": "pulse"
                    },
                    {
                      "label": "rubberBand",
                      "value": "rubberBand"
                    },
                    {
                      "label": "shake",
                      "value": "shake"
                    },
                    {
                      "label": "headShake",
                      "value": "headShake"
                    },
                    {
                      "label": "swing",
                      "value": "swing"
                    },
                    {
                      "label": "tada",
                      "value": "tada"
                    },
                    {
                      "label": "wobble",
                      "value": "wobble"
                    },
                    {
                      "label": "jello",
                      "value": "jello"
                    },
                    {
                      "label": "bounceIn",
                      "value": "bounceIn"
                    },
                    {
                      "label": "bounceInDown",
                      "value": "bounceInDown"
                    },
                    {
                      "label": "bounceInLeft",
                      "value": "bounceInLeft"
                    },
                    {
                      "label": "bounceInRight",
                      "value": "bounceInRight"
                    },
                    {
                      "label": "bounceInUp",
                      "value": "bounceInUp"
                    },
                    {
                      "label": "fadeIn",
                      "value": "fadeIn"
                    },
                    {
                      "label": "fadeInDown",
                      "value": "fadeInDown"
                    },
                    {
                      "label": "fadeInDownBig",
                      "value": "fadeInDownBig"
                    },
                    {
                      "label": "fadeInLeft",
                      "value": "fadeInLeft"
                    },
                    {
                      "label": "fadeInLeftBig",
                      "value": "fadeInLeftBig"
                    },
                    {
                      "label": "fadeInRight",
                      "value": "fadeInRight"
                    },
                    {
                      "label": "fadeInRightBig",
                      "value": "fadeInRightBig"
                    },
                    {
                      "label": "fadeInUp",
                      "value": "fadeInUp"
                    },
                    {
                      "label": "fadeInUpBig",
                      "value": "fadeInUpBig"
                    },
                    {
                      "label": "flipInX",
                      "value": "flipInX"
                    },
                    {
                      "label": "flipInY",
                      "value": "flipInY"
                    },
                    {
                      "label": "lightSpeedIn",
                      "value": "lightSpeedIn"
                    },
                    {
                      "label": "rotateIn",
                      "value": "rotateIn"
                    },
                    {
                      "label": "rotateInDownLeft",
                      "value": "rotateInDownLeft"
                    },
                    {
                      "label": "rotateInDownRight",
                      "value": "rotateInDownRight"
                    },
                    {
                      "label": "rotateInUpLeft",
                      "value": "rotateInUpLeft"
                    },
                    {
                      "label": "rotateInUpRight",
                      "value": "rotateInUpRight"
                    },
                    {
                      "label": "hinge",
                      "value": "hinge"
                    },
                    {
                      "label": "jackInTheBox",
                      "value": "jackInTheBox"
                    },
                    {
                      "label": "rollIn",
                      "value": "rollIn"
                    },
                    {
                      "label": "zoomIn",
                      "value": "zoomIn"
                    },
                    {
                      "label": "zoomInDown",
                      "value": "zoomInDown"
                    },
                    {
                      "label": "zoomInLeft",
                      "value": "zoomInLeft"
                    },
                    {
                      "label": "zoomInRight",
                      "value": "zoomInRight"
                    },
                    {
                      "label": "zoomInUp",
                      "value": "zoomInUp"
                    },
                    {
                      "label": "slideInDown",
                      "value": "slideInDown"
                    },
                    {
                      "label": "slideInLeft",
                      "value": "slideInLeft"
                    },
                    {
                      "label": "slideInRight",
                      "value": "slideInRight"
                    },
                    {
                      "label": "slideInUp",
                      "value": "slideInUp"
                    },
                    {
                      "label": "heartBeat",
                      "value": "heartBeat"
                    }
                  ]
                },
                {
                  "type": "select",
                  "id": "animation_duration",
                  "label": "Animation Duration",
                  "options": [
                    {
                      "value": "1s",
                      "label": "1s"
                    },
                    {
                      "value": "2s",
                      "label": "2s"
                    },
                    {
                      "value": "3s",
                      "label": "3s"
                    }
                  ],
                  "default": "1s"
                },
                {
                  "type": "select",
                  "id": "animation_delay",
                  "label": "Animation Delay",
                  "options": [
                    {
                      "value": "0",
                      "label": "0"
                    },
                    {
                      "value": "1",
                      "label": "1s"
                    },
                    {
                      "value": "2",
                      "label": "2s"
                    },
                    {
                      "value": "3",
                      "label": "3s"
                    },
                    {
                      "value": "4",
                      "label": "4s"
                    },
                    {
                      "value": "5",
                      "label": "5s"
                    },
                    {
                      "value": "6",
                      "label": "6s"
                    },
                    {
                      "value": "7",
                      "label": "7s"
                    },
                    {
                      "value": "8",
                      "label": "8s"
                    }
                  ],
                  "default": "0"
              }
        
       
	],
  "blocks" : [
          {
            "type": "image",
            "name": "Slide",
            "settings": [
              {
                "type": "header",
                "content": "Slide"
              },
              {
                "type": "image_picker",
                "id": "mainitem_slide_image",
                "label": "Image",
                "info": "Minimun: 1280px X 854px - Maximum : 2000px X 1334px"
              },
			  {
                  "type": "text",
                  "id": "sliderlink",
                  "label": "Link Image"
              },
              {
                "type": "text",
                "id": "mainitem_slide_heading",
                "label": "Heading text",
                "placeholder": "New Collection"
              },
			  
              {
                "type": "text",
                "id": "mainitem_slide_link",
                "label": "Link URL",
                "placeholder": "http:\/\/yourshop.com\/collection"
              },
			  {
                "type": "color",
                "id": "mainitem_slide_color",
                "label": "Heading Color"
              }
            ]
          }
        ]
  }
{% endschema %}