{% sw_extends '@Storefront/storefront/component/product/listing.html.twig' %}
{% block product_listing %}
{% set listingPagination = listingPagination|merge({
resetAllFilterButtonClasses: 'filter-reset-all',
}) %}
<div class="cms-element-product-listing-wrapper grid-listing-view-mode"
data-listing-pagination="true"
data-listing-pagination-options='{{ paginationConfig }}'
data-listing="true"
data-listing-options='{{ listingPagination|json_encode }}'>
{% block element_product_listing_wrapper_content %}
{{ parent() }}
{% endblock %}
</div>
{% endblock %}
{% block element_product_listing_pagination_nav_actions %}
<div class="cms-element-product-listing-actions row justify-content-end">
<div class="col-lg-auto col-12">
{% block element_product_listing_sorting %}
{% set config = { sorting: searchResult.sorting } %}
{% set showSorting = (slot.config.showSorting.value is defined) ? slot.config.showSorting.value : true %}
{% if showSorting and searchResult.availableSortings|length > 1 %}
<div class="sorting" data-listing-sorting="true" data-listing-sorting-options='{{ config|json_encode }}'>
<p class="sorting-label">{{ 'general.sortingLabel'|trans|striptags }}</p>
<select class="sorting custom-select" aria-label="{{ 'general.sortingLabel'|trans|striptags }}">
{% for sorting in searchResult.availableSortings %}
{% set key = sorting.key %}
<option value="{{ key }}"{% if key == searchResult.sorting %} selected{% endif %}>{{ sorting.translated.label|sw_sanitize }}</option>
{% endfor %}
</select>
</div>
{% endif %}
{% endblock %}
</div>
</div>
{% endblock %}