{% import '@SyliusShop/Common/Macro/money.html.twig' as money %}
{# {{ dump(method) }} #}
<div class="item delivery{{ method.id }} method{{ method.pickup }}" {{ sylius_test_html_attribute('shipping-item') }} >
{% if form.vars.checked == false %}
<div class="over-click"></div>
{% endif %}
<div class="field">
<div class="ui radio checkbox js-pickup-{{ method.pickup }}" {{ sylius_test_html_attribute('shipping-method-checkbox') }}>
{{ form_widget(form, sylius_test_form_attribute('shipping-method-select')|merge({'attr': {'autocomplete': 'off'}})) }}
</div>
</div>
<div class="content">
{% set image_bg = '' %}
{% if null != method.images %}
{% for image in method.images %}
{% set image_bg = asset('/media/image/'~image.path) %}
{% endfor %}
<img src="{{ image_bg }}" class="ui image" />
{% endif %}
<div>
<a class="header" {{ sylius_test_html_attribute('shipping-method-label') }}>{{ form_label(form) }}</a>
{% if method.description is not null %}
<div class="description">
<p>{{ method.description }}</p>
</div>
{% endif %}
<div class="description">
{% if method.pickup != 'apel' %}
{{ 'app.front.commande.livraisonprevue'|trans }}{#: #}
{{ app_shipping_estimate_start_date(method)|date('d/m/Y') }}{# - {{ app_shipping_estimate_end_date(method)|date('d/m/Y') }}#}
{% endif %}
</div>
</div>
</div>
<div class="extra">
<div class="ui large right floated fee label" {{ sylius_test_html_attribute('shipping-method-fee') }}>
{% if app_is_shipping_free(method.id) and method.pickup != 'shop' %}
<div class="old-price">{{ money.convertAndFormat(fee) }}</div>
0,00 €
{% else %}
{{ money.convertAndFormat(fee) }}
{% endif %}
</div>
</div>
{% if form.vars.checked == true %}
<div class="subcontent">
{% include '@SyliusShop/Checkout/SelectShipping/Choices/_'~ method.subTemplate ~'.html.twig' ignore missing %}
</div>
{% endif %}
</div>