{% sw_extends '@loyxxfullwidthproductlisting/storefront/component/product/listing.html.twig' %}

{% block element_product_listing_col %}

    {% set pluginLayouts = ['list-layout'] %}

    {% if pluginConfig is defined %}
        {% set element = pluginConfig %}
    {% endif %}
    {% for product in searchResult %}
        <div data-loyxx-cms-element-id="{{ element.id }}"
             class="cms-listing-col {% if boxLayout in pluginLayouts %} box-list-layout-container {% endif %} col-12 col-xs-12 col-sm-12 col-md-12 col-lg-6 col-xl-amds-magik
        " loyxx-product-list-grid="true"

                {% if boxLayout in pluginLayouts and element.config.isGridEnabled.value %}
                    data-loyxx-grid-xs-count="{{ element.config.gridCounts.value.xs }}"
                    data-loyxx-grid-sm-count="{{ element.config.gridCounts.value.sm }}"
                    data-loyxx-grid-md-count="{{ element.config.gridCounts.value.md }}"
                    data-loyxx-grid-lg-count="{{ element.config.gridCounts.value.lg }}"
                    data-loyxx-grid-xl-count="{{ element.config.gridCounts.value.xl }}"
                {% endif %}
        >
            {% block element_product_listing_box %}
                {% sw_include '@Storefront/storefront/component/product/card/box.html.twig' with {
                    'layout': boxLayout,
                    'displayMode': displayMode
                } %}
            {% endblock %}
        </div>
    {% endfor %}
{% endblock %}


