{% import "@SyliusShop/Common/Macro/money.html.twig" as money %}
{% set minimum_order_value = cart.channel.minimumOrderValue %}
{% set total = sylius_order_items_subtotal(cart) %}
{% if cart.empty %}
{% else %}
<div class="panier-deroulant text-left">
<div class="content-panier-deroulant">
{% if is_granted('ROLE_USER') %}
{% set missingFrancoPortHT = app_get_missing_franco_port() %}
{% if missingFrancoPortHT %}
{#{% set missingFrancoPort = missingFrancoPortHT * 1.2 %}#}
<div class="font-weight-bold">{{'app.product.more_than'|trans}} <span class="color-primary-s">{{ money.convertAndFormat(missingFrancoPortHT) }}</span> {{'app.product.to_benefit_the_free_delivery'|trans|raw}}</div>
{% endif %}
{% endif %}
<div class="panier-bottom">
<table class="table table-panier-perso table-perso font-16 mb-0 text-dark" width="100%" cellpading="0">
<tr >
<td class="px-0 py-2 border-top border-left-0 border-right-0 ">
<span>{{ 'app.cart.shipping_estimated_cost'|trans }} :</span>
</td>
<td class="text-right px-0 font-weight-bold py-2 border-top border-left-0 border-right-0 ">
<strong id="sylius-summary-shipping-total" >{{ money.convertAndFormat(cart.shippingTotal) }}</strong>
</td>
</tr>
<tr>
<td class="text-left py-2 px-0"><span> {{ 'app.cart.totalHT'|trans }} : </span></td>
<td class="text-right py-2 px-0"><strong class="font-weight-bold">{{ money.convertAndFormat(cart.itemsTotal) }}</strong></td>
</tr>
<tr>
<td class="px-0 border-top-0 border-left-0 border-right-0 border-bottom py-2">
<div class=" px-0">{{ 'app.cart.order_total'|trans }} : </div>
</td>
<td id="sylius-summary-grand-total" class="text-right px-0 py-2 border-top-0 border-left-0 border-right-0 border-bottom">
<strong class="font-weight-bold px-0 color-pink-s font-22">{{ money.convertAndFormat(cart.total) }}</strong>
</td>
</tr>
</table>
</div>
<div class="btn-panier-der pt-2" >
{% if total >= minimum_order_value %}
<a href="{{ path('sylius_shop_checkout_start') }}" class="btn-link btn-block py-btn-2 text-uppercase" title="{{ 'app.cart.pay_order'|trans }}"> {{ 'sylius.ui.checkout'|trans }}</a>
{% endif %}
</div>
</div>
</div>
{% endif %}