{% extends 'frontend.html.twig' %}
{% block content %}
<div class="rts-cart-section section-gap" id="cart-page">
<div class="container">
<h4 class="section-title">{{ 'app.your cart selection'|trans }}</h4>
<div class="row justify-content-between">
<div class="col-xl-7">
<div class="cart-table-area">
<table class="table table-bordered table-hover" id="cart-table">
<tbody>
{% for area in areas %}
<tr data-uuid="{{ area.uuid }}" class="cart-product-row-{{ area.uuid }}">
<td class="ps-3">
<div class="product-title-area">
<h4 class="product-title">{{ area.name }}</h4>
<span class="pretitle">
{{ 'app.measurements'|trans }}: {{ area.width}} x {{ area.height}} mm<br>
{{ 'app.contractDuration'|trans }}: {{ area.minDuration }} Monate<br>
{{ 'app.unitPricePerYear'|trans }}: {{ area.pricePerYear }} {{ "app.currency_sign"|trans }}
</span>
</div>
</td>
<td>
{{ 'app.setup_and_production'|trans }}
<h4 class="product-title">
<span class="product-setup-price">{% if area.withinSetup %}zzgl. {{ area.setupPrice }} {{ "app.currency_sign"|trans }}{% else %}Für {{ area.setupPrice }} {{ "app.currency_sign"|trans }} hinzufügen{% endif %}</span>
<button data-uuid="{{ area.uuid }}" data-within-setup="{{ area.withinSetup }}" class="toggleProductionAndSetupCartView" type="button">
<i class="fal fa-{% if area.withinSetup %}minus{% else %}plus{% endif %}-square"></i>
</button>
</h4>
</td>
<td>
{{ 'app.totalForDuration'|trans }}
<h4 class="product-price {{ area.uuid }}-product-price">
{{ area.pricePerPeriod }} {{ "app.currency_sign"|trans }}
</h4>
</td>
<td class="last-td pe-3">
<button type="button" class="remove-from-cart" data-uuid="{{ area.uuid }}">
<i class="fa fa-trash"></i>
</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div class="col-xl-4">
<div class="checkout-box">
<div class="checkout-box-inner">
<div class="total-area">
<span class="title">{{ 'app.in total'|trans|capitalize }}</span>
<span class="total-price">{{ cartTotal }} {{ "app.currency_sign"|trans }}</span>
</div>
</div>
<a href="{{ path('app_frontend_checkout') }}#checkout-page" class="btn procced-btn btn-customer mb-3" id="toCheckoutBtn">
{{ 'app.to checkout'|trans }}
</a>
<a href="{{ path('app_frontend_index') }}" class="continue-shopping">
<i class="fal fa-long-arrow-left"></i> {{ 'Back to home'|trans }}
</a>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block js_bottom %}
<script type="text/javascript">
{% include '/frontend/cart/js/toogle-setup.js.twig' %}
{% include '/frontend/cart/js/remove-item.js.twig' %}
</script>
{% endblock %}