<div class="{% unless section.settings.mobile_image_full_width %}container{% endunless %}">
<div {% render 'overwrite-theme-style', settings: section.settings %}>

    <div class="selling-point-slider container-vertical swiper" data-desktop-slides-per-view="{{ section.settings.desktop_slides_per_view }}" data-slideshow-speed="{{ section.settings.slideshow_speed }}">
        <div class="swiper-wrapper">

        {%- for block in section.blocks -%}
            <div class="selling-point-slider-point swiper-slide">
                {%- capture image_style -%}height: {{ block.settings.image_height }}px;{%- endcapture -%}
                {% render 'image', image: block.settings.image, style: image_style %}

                <span {% render 'overwrite-theme-style', settings: block.settings %}>{{ block.settings.text }}</span>
            </div>
        {%- endfor -%}

        </div>
    </div>

</div>
</div>

{% schema %}
{
    "name": "t:sections.section-selling-point-slider.name",
    "settings": [
        {
            "type": "checkbox",
            "id": "mobile_image_full_width",
            "label": "t:sections.section-selling-point-slider.settings.mobile_image_full_width",
            "default": false
        },
        {
            "type": "range",
            "id": "desktop_slides_per_view",
            "label": "t:sections.section-selling-point-slider.settings.desktop_slides_per_view",
            "min": 0,
            "max": 10,
            "step": 1,
            "unit": "x",
            "default": 3
        },
        {
            "type": "range",
            "id": "slideshow_speed",
            "label": "t:sections.section-selling-point-slider.settings.slideshow_speed",
            "min": 0,
            "max": 15,
            "step": 0.5,
            "unit": "Sek",
            "default": 5
        },
        {
            "type": "header",
            "content": "t:sections.general.margin"
        },
        {
            "type": "range",
            "id": "overwrite_theme_margin_top",
            "label": "t:sections.section-selling-point-slider.settings.overwrite_theme_margin_top",
            "min": -30,
            "max": 70,
            "step": 1,
            "unit": "px",
            "default": 0
        },
        {
            "type": "range",
            "id": "overwrite_theme_margin_bottom",
            "label": "t:sections.section-selling-point-slider.settings.overwrite_theme_margin_bottom",
            "min": -30,
            "max": 70,
            "step": 1,
            "unit": "px",
            "default": 0
        },
        {
            "type": "header",
            "content": "t:sections.general.theme-settings.content",
            "info": "t:sections.general.theme-settings.info"
        },
        {
            "type": "color",
            "id": "overwrite_theme_background_color",
            "label": "t:sections.section-selling-point-slider.settings.overwrite_theme_background_color",
            "info": "t:sections.section-selling-point-slider.settings.overwrite_theme_background_color_info"
        }
    ],
    "blocks": [
        {
            "type": "selling-point",
            "name": "t:sections.section-selling-point-slider.blocks.selling-point.name",
            "settings": [
                {
                    "type": "image_picker",
                    "id": "image",
                    "label": "t:sections.section-selling-point-slider.blocks.selling-point.settings.image"
                },
                {
                    "type": "range",
                    "id": "image_height",
                    "label": "t:sections.section-selling-point-slider.blocks.selling-point.settings.image_height",
                    "min": 0,
                    "max": 50,
                    "step": 1,
                    "unit": "px",
                    "default": 16
                },
                {
                    "type": "richtext",
                    "id": "text",
                    "label": "t:sections.section-selling-point-slider.blocks.selling-point.settings.text"
                },
                {
                    "type": "header",
                    "content": "t:sections.general.theme-settings.content",
                    "info": "t:sections.general.theme-settings.info"
                },
                {
                    "type": "range",
                    "id": "overwrite_theme_font_size",
                    "label": "t:sections.section-selling-point-slider.blocks.selling-point.settings.overwrite_theme_font_size",
                    "min": 0,
                    "max": 40,
                    "step": 1,
                    "unit": "px",
                    "default": 0,
                    "info": "t:sections.section-selling-point-slider.blocks.selling-point.settings.overwrite_theme_font_size_info"
                },
                {
                    "type": "color",
                    "id": "overwrite_theme_text_color",
                    "label": "t:sections.section-selling-point-slider.blocks.selling-point.settings.overwrite_theme_text_color",
                    "info": "t:sections.section-selling-point-slider.blocks.selling-point.settings.overwrite_theme_text_color_info"
                }
            ]
        }
    ],
    "presets": [
        {
            "name": "t:sections.section-selling-point-slider.name"
        }
    ]
}
{% endschema %}