{% sw_extends '@Storefront/storefront/element/cms-element-image-gallery.html.twig' %}
{% block element_image_gallery_inner_wrapper %}
{{ parent() }}
<div class="detail_badges product-badges">
{% set listPrice = page.product.priceRange or page.product.calculatedPrices.count > 0 ? null : page.product.calculatedPrice.listPrice.percentage > 0 %}
{% if page.product.translated.customFields.custom_same_day_checkbox %}
<div class="badge-same-day">
<span class="badge">{{ "wlcustom.product_box.same_day"|trans }}</span>
</div>
{% endif %}
{% if page.product.translated.customFields.custom_lokal_lokal_ or page.product.translated.customFields.custom_lokal_region_ %}
{% if (page.product.translated.customFields.custom_lokal_lokal_ and page.product.translated.customFields.custom_lokal_region_) or (page.product.translated.customFields.custom_lokal_lokal_ and page.product.translated.customFields.custom_lokal_region_ == false) %}
<div class="badge-lokal">
<span class="badge">Lokales Produkt</span>
</div>
{% endif %}
{% if (page.product.translated.customFields.custom_lokal_lokal_ == false) and page.product.translated.customFields.custom_lokal_region_ %}
<div class="badge-lokal">
<span class="badge">Aus der Region</span>
</div>
{% endif %}
{% endif %}
{% if listPrice or page.product.isNew %}
{% if (page.product.isNew and listPrice) or (page.product.isNew and listPrice == false) %}
<div class="badge-success">
<span class="badge badge-new">{{ "listing.boxLabelNew"|trans|sw_sanitize }}</span>
</div>
{% endif %}
{% if (page.product.isNew == false and listPrice) %}
<div class="badge-danger">
<span class="badge badge-discount">Sale</span>
</div>
{% endif %}
{% endif %}
{% if page.product.markAsTopseller %}
<div>
<span class="badge badge-warning badge-topseller">{{ "listing.boxLabelTopseller"|trans|sw_sanitize }}</span>
</div>
{% endif %}
</div>
{% endblock %}