{% sw_extends "@Storefront/storefront/component/product/card/price-unit.html.twig" %}
{% block component_product_box_price_unit %}
{% endblock %}
{% block component_product_box_price %}
<div class="product-price-wrapper">
{% set price = real %}
{# Price from removed per Cytex request #}
{% set isListPrice = price.listPrice.percentage > 0 %}
<p class="product-price{% if isListPrice and not displayFrom %} with-list-price {% endif %}">
{% if displayFrom %}
<span class="product-price-displayfrom">
{{ "listing.listingTextFrom"|trans|sw_sanitize }}
</span>
{% endif %}
{% if isListPrice and not displayFrom %}
{% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|trim|sw_sanitize %}
{% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|trim|sw_sanitize %}
{% if beforeListPriceSnippetExists is same as("listing.beforeListPrice") %}
{% set beforeListPriceSnippetExists = "" %}
{% elseif afterListPriceSnippetExists is same as("listing.afterListPrice") %}
{% set afterListPriceSnippetExists = "" %}
{% endif %}
{% set hideStrikeTrough = beforeListPriceSnippetExists or afterListPriceSnippetExists %}
{% set taxBase = price.calculatedTaxes|first %}
<span class="list-price{% if hideStrikeTrough %} list-price-no-line-through {% endif %}">
{% if beforeListPriceSnippetExists %}{{ beforeListPriceSnippetExists}}{% endif %}
<span class="list-price-price">{{ price.listPrice.price|currency }}</span>
{% if afterListPriceSnippetExists %}{{ afterListPriceSnippetExists }}{% endif %}
</span>
{% endif %}
{% set taxBase = price.calculatedTaxes|first %}
{% if context.taxState == "gross" %}
{% set unitPriceExclVat = (taxBase.price - taxBase.tax) %}
{% else %}
{% set unitPriceExclVat = price.unitPrice %}
{% endif %}
<span class="product-price-main">
{{ unitPriceExclVat|currency }}
</span>
</p>
</div>
{% block component_product_box_price_vat %}
{% set taxBase = price.calculatedTaxes|first %}
{% if context.taxState == "gross" %}
{% set unitPriceInclVat = (taxBase.price) %}
{% else %}
{% set unitPriceInclVat = (taxBase.price + taxBase.tax) %}
{% endif %}
<div class="product-price-wrapper">
<p class="product-price-moms">
({{ "listing.moms-pre-text"|trans|sw_sanitize }} {{ unitPriceInclVat|currency }})
</p>
</div>
{% endblock %}
{% endblock %}