{#
// inputs:
// - classes: string - CSS classes (default: '')
// - layout:  string - one of ['product-sidebar', 'product-full', 'quickview']
#}

{% set classes = inputs.classes|default('') %}
{% set layout = inputs.layout %}
{% set size = 500 %}

{% set root_classes = classnames('product-gallery', 'product-gallery--layout--'~layout, classes) %}

<div class="{{ root_classes }}" data-layout="{{ layout }}">
    <div class="product-gallery__featured">
        <button type="button" class="product-gallery__zoom">
            {{ svg('zoom-in-24.svg') }}
        </button>
        <div class="owl-carousel">
            {% for i in [2, 1, 3, 4] %}
                <!--
                The data-width and data-height attributes must contain the size of a larger version
                of the product image.

                If you do not know the image size, you can remove the data-width and data-height
                attribute, in which case the width and height will be obtained from the naturalWidth
                and naturalHeight property of img.image__tag.
                -->
                <a
                    class="image image--type--product"
                    href="{{ image('images/products/product-'~i~'.jpg', {size: 700}) }}"
                    target="_blank"
                    data-width="700"
                    data-height="700"
                >
                    <div class="image__body">
                        <img
                            class="image__tag"
                            src="{{ image('images/products/product-'~i~'.jpg', {size: size}) }}"
                            alt=""
                        >
                    </div>
                </a>
            {% endfor %}
        </div>
    </div>
    <div class="product-gallery__thumbnails">
        <div class="owl-carousel">
            {% for i in [2, 1, 3, 4] %}
                <div class="product-gallery__thumbnails-item image image--type--product">
                    <div class="image__body">
                        <img class="image__tag" src="{{ image('images/products/product-'~i~'.jpg', {size: 70}) }}" alt="">
                    </div>
                </div>
            {% endfor %}
        </div>
    </div>
</div>
