{% sw_extends '@Storefront/storefront/component/delivery-information.html.twig' %}
{% block component_delivery_information %}
{# @var product \Shopware\Core\Content\Product\ProductEntity #}
{% if page is defined and page.product is defined %}
{% set product = page.product %}
{% endif %}
<div class="product-delivery-information">
{% if product.shippingFree %}
{% block component_delivery_information_shipping_free %}
{{ parent() }}
{% endblock %}
{% endif %}
{% if not product.active %}
{% block component_delivery_information_not_available %}
{{ parent() }}
{% endblock %}
{% elseif product.releaseDate and product.releaseDate|date('U') > "now"|date('U') %}
{% block component_delivery_information_pre_order %}
{{ parent() }}
{% endblock %}
{% elseif product.availableStock >= product.minPurchase %}
{% block component_delivery_information_available %}
<link itemprop="availability" href="http://schema.org/InStock"/>
<p class="delivery-information delivery-available">
<span class="delivery-status-indicator bg-success"></span>
{{ "detail.deliveryTimeAvailable"|trans({
'%stock%': product.availableStock
})|sw_sanitize }}
<span class="extended-delivery--information">
<br/>
<span class="delivery--text delivery--text-available" data-tooltip="true" title="{{ 'general.extendedWarrantyText'|trans }}">
<i class="fas fa-check"></i>
{{ 'general.extendedWarranty'|trans|raw }}
</span>
<br/>
<span class="delivery--text delivery--text-available" data-tooltip="true" title="{{ 'general.environmentallyFriendlyText'|trans }}">
<i class="fas fa-check"></i>
{{ 'general.environmentallyFriendly'|trans }}
</span>
<br/>
<span class="delivery--text delivery--text-available" data-tooltip="true" title="{{ 'general.easyPayingText'|trans }}">
<i class="fas fa-check"></i>
{{ 'general.easyPaying'|trans }}
</span>
<br/>
</span>
</p>
{% endblock %}
{% elseif product.isCloseout and product.availableStock < product.minPurchase %}
{% block component_delivery_information_soldout %}
{{ parent() }}
{% endblock %}
{% elseif product.availableStock < product.minPurchase and product.deliveryTime and product.restockTime %}
{% block component_delivery_information_restock %}
{{ parent() }}
{% endblock %}
{% endif %}
</div>
{% endblock %}