{% extends '@Storefront/storefront/component/buy-widget/buy-widget-price.html.twig' %}
{% block buy_widget_price_content %}
{% set isRegulationPrice = price.regulationPrice != null %}
{% set listPrice = price.listPrice %}
{# {% if listPrice.percentage > 0 %} #}
{% block buy_widget_was_price %}
{% block buy_widget_was_price_badge %}{% endblock %}
{% block buy_widget_was_price_wrapper %}
<span class="product-detail-list-price-wrapper">
{% if beforeListPriceSnippetExists %}{{"listing.beforeListPrice"|trans|trim}}{% endif %}
<div class="d-flex row">
<div class="col d-flex">
{% if listPrice.percentage > 0 %}
<span{% if not (afterListPriceSnippetExists or beforeListPriceSnippetExists) %} class="list-price-price"{% endif %}>{{ listPrice.price|currency }}</span>
{% endif %}
<p class="product-detail-price{% if listPrice.percentage > 0 %} with-list-price{% endif %}">
{{ price.unitPrice|currency }}
</p>
{% if afterListPriceSnippetExists %}
{{"listing.afterListPrice"|trans|trim}}
{% endif %}
</div>
</div>
</span>
{% if listPrice.percentage > 0 %}
<span class="product-detail-list-price-percentage">
<span class="list-price-percentage">{{ "detail.listPricePercentage"|trans({'%price%': listPrice.percentage })|sw_sanitize }}</span>
</span>
{% endif %}
{% endblock %}
{% endblock %}
{# {% endif %} #}
{% if isRegulationPrice %}
<span class="product-detail-list-price-wrapper">
<span class="regulation-price">{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}</span>
</span>
{% endif %}
{% endblock %}