{% sw_extends '@Storefront/storefront/component/buy-widget/buy-widget-price.html.twig' %}
{% block buy_widget_price_inner %}
{% if product.calculatedPrices|length > 1 %}
{% block buy_widget_price_block %}
{{ parent() }}
{% endblock %}
{% else %}
{% set price = product.calculatedPrice %}
{% if product.calculatedPrices|length == 1 %}
{% set price = product.calculatedPrices.first %}
{% endif %}
<meta itemprop="price"
content="{{ price.unitPrice }}">
{% block buy_widget_price_content %}
{% set listPrice = price.listPrice %}
{% if listPrice.percentage > 0 %}
{% block buy_widget_was_price %}
{% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
{% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
{% block buy_widget_was_price_wrapper %}
<span class="product-detail-list-price-wrapper mr-2">
<span class="list-price-price line-through">{{ listPrice.price }}</span>
</span>
{% endblock %}
{% endblock %}
{% endif %}
{% block buy_widget_product_price %}
<p class="product-detail-price{% if listPrice.percentage > 0 %} with-list-price text-red-500 font-medium text-base{% endif %} inline-block">
{{ price.unitPrice }}
</p>
{% endblock %}
{% endblock %}
{% endif %}
{% endblock %}