{% sw_extends "@Storefront/storefront/layout/header/top-bar.html.twig" %}
{% block layout_header_top_bar_language %}
{% set countries = page.countries ? page.countries : page.extensions["FourtwosixShippingCostsCalculator"]["countries"].elements %}
<form name="precalc"
method="post"
action="{{ path('frontend.checkout.configure') }}"
data-form-auto-submit="true"
class="d-flex my-3"
>
{# @deprecated tag:v6.5.0 - Block page_checkout_cart_shipping_costs_csrf will be removed. #}
{{ block("page_checkout_cart_shipping_costs_csrf", "@Storefront/storefront/page/checkout/cart/index.html.twig") }}
{% block page_checkout_cart_shipping_costs_form_group_country %}
{% if not context.customer %}
<div class="form-group d-flex ml-3 m-0">
<label class="text-nowrap align-self-center mr-2 m-0" for="countryId">{{ "checkout.shippingCountry"|trans|sw_sanitize }}</label>
<select class="form-select form-control" type="text" id="countryId" name="countryId">
{% for country in countries %}
<option value="{{ country.id }}"
{{ country.id == context.shippingLocation.country.id ? 'selected="selected"' : '' }}>
{{ country.translated.name }}
</option>
{% endfor %}
</select>
</div>
{% endif %}
{% endblock %}
{% block page_checkout_cart_shipping_costs_form_group_zip %}
{% if not context.customer %}
<div class="form-group d-flex ml-3 m-0">
<label class="text-nowrap align-self-center mr-2 m-0" data-input-name="zipcode" for="zipcode">{{ "address.zipcodeLabel"|trans|sw_sanitize }}</label>
<input class="form-control" type="text" id="zipcode" value="{{ context.shippingLocation.address.zipcode }}" name="zipcode" placeholder="{{ "address.zipcodePlaceholder"|trans|sw_sanitize }}">
</div>
{% endif %}
{% endblock %}
{% block page_checkout_cart_shipping_costs_form_group_shipping_method %}
<div class="form-group mx-3 m-0 d-none">
<label class="text-nowrap align-self-center mr-2 m-0" for="shippingMethodId">{{ "checkout.shippingMethod"|trans|sw_sanitize }}</label>
<select class="form-select form-control" type="text" id="shippingMethodId" name="shippingMethodId">
{% for shipping in page.shippingMethods ?? [context.shippingMethod] %}
<option value="{{ shipping.id }}"
{% if shipping.id == context.shippingMethod.id %} selected="selected"{% endif %}>
{{ shipping.translated.name }}
</option>
{% endfor %}
</select>
</div>
{% endblock %}
<input type="hidden" name="redirectTo" value="frontend.checkout.cart.page">
</form>
{{ parent() }}
{% endblock %}