{% sw_extends '@Storefront/storefront/component/address/address-form.html.twig' %}
{% block component_address_form_company_department_input %}
<input type="text"
class="form-control{% if violationPath %} is-invalid{% endif %}"
maxlength="35"
id="{{ idPrefix ~ prefix }}department"
placeholder="{{ "address.companyDepartmentPlaceholder"|trans|striptags }}"
name="{{ prefix }}[department]"
value="{{ data.get('department') }}">
{% endblock %}
{% block component_address_form_country_state_select %}
{% endblock %}
{% block component_address_form_country_select %}
{% set de = page.countries|filter(v => v.iso=="DE")|first %}
{% set deId = de ? de.id : null %}
{% set countryId = data.get('countryId') ?? deId %}
<select class="country-select custom-select{% if violationPath %} is-invalid{% endif %}"
id="{{ prefix }}AddressCountry"
name="{{ prefix }}[countryId]"
required="required"
data-initial-country-id="{{ countryId }}">
{% if not countryId %}
<option disabled="disabled"
value=""
selected="selected">
{{ "address.countryPlaceholder"|trans|sw_sanitize }}
</option>
{% endif %}
{% for country in page.countries %}
<option {% if country.id == countryId %}
selected="selected"
{% endif %}
value="{{ country.id }}">
{{ country.translated.name }}
</option>
{% endfor %}
</select>
{% endblock %}
{% block component_address_form_address_fields %}
<div class="form-row country-and-state-form-elements" data-country-state-select="true">
{{ block('component_address_form_country') }}
</div>
<div class="form-row">
{{ block('component_address_form_zipcode_city') }}
</div>
<div class="form-row">
{{ block('component_address_form_street') }}
</div>
<div class="form-row">
{{ block('component_address_form_additional_field1') }}
{{ block('component_address_form_additional_field2') }}
</div>
<div class="form-row">
{{ block('component_address_form_phone_number') }}
</div>
{% endblock %}