{% from 'utils.html.twig' import ico, switch %}
{# MODO DE EXIBIÇÃO TIPO PESSOA #}
{% if addressType is not defined %}
{% set addressType = '' %}
{% endif %}
{% set addressTypeEdit = (
receiverEdit ? (addressType ? receiverPartnerEdit : receiverEdit) : false
) %}
<div class="cp-cols">
{# ZIP CODE #}
<div class="cp cp-3">
<label for="zipCode{{ addressType }}">{{ getLanguage('zipcode', 'profile') }}{{ req|raw }}</label>
<input type="text" id="{{ (addressType) ? 'partner-' }}receiver-zipCode" name="zipCode{{ addressType }}" class="js--input-form" placeholder="{{ getLanguage('enter_zip_code', 'profile') }}" data-apply-search="true" value="{{ addressTypeEdit? addressTypeEdit.zipCode }}" required>
</div>
{# COUNTRY #}
<input class="receiver-country" type="checkbox" id="{{ (addressType) ? 'partner-' }}receiver-country" name="country{{ addressType }}" value="1" readonly checked />
{# STATE #}
<div class="cp cp-3" data-show-brazil>
<label for="state{{ addressType }}">{{ getLanguage('state', 'profile') }}{{ req|raw }}</label>
<div class="select-wrap">
<select id="{{ (addressType) ? 'partner-' }}receiver-state"
name="state{{ addressType }}"
class="custom-select custom-select--search js--select-form"
request="{{ path('stateList') }}"
save="{{ (addressTypeEdit and addressTypeEdit.state is not empty) ? addressTypeEdit.state.id }}"
required="required">
<option value="">{{ getLanguage('select_state', 'profile') }}</option>
<option value="other">{{ getLanguage('other', 'profile') }}</option>
</select>
<i class="loader">{{ ico('loader-wish') }}</i>
</div>
</div>
{# CITY #}
<div class="cp cp-3" data-show-brazil>
<label for="city{{ addressType }}">{{ getLanguage('city', 'profile') }}{{ req|raw }}</label>
<div class="select-wrap">
<select id="{{ (addressType) ? 'partner-' }}receiver-city"
name="city{{ addressType }}"
class="custom-select custom-select--search js--select-form"
request="{{ path('cityList') }}"
save="{{ (addressTypeEdit and addressTypeEdit.city is not empty)? addressTypeEdit.city.id }}"
required="required">
<option value="">{{ getLanguage('select_city', 'profile') }}</option>
<option value="other">{{ getLanguage('other', 'profile') }}</option>
</select>
<i class="loader">{{ ico('loader-wish') }}</i>
</div>
</div>
{# ADDRESS #}
<div class="cp cp-3 receiver-address">
<label for="address{{ addressType }}">{{ getLanguage('address', 'profile') }}{{ req|raw }}</label>
<input type="text" id="{{ (addressType) ? 'partner-' }}receiver-address" name="address{{ addressType }}"
class="js--input-form" placeholder="{{ getLanguage('type_your_address', 'receiver') }}"
value="{{ addressTypeEdit? addressTypeEdit.address }}" required>
</div>
{# NUMBER #}
<div class="cp cp-4">
<label for="addressNumber{{ addressType }}">{{ getLanguage('number', 'profile') }}{{ req|raw }}</label>
<input type="text" id="{{ (addressType) ? 'partner-' }}receiver-addressNumber" name="addressNumber{{ addressType }}"
class="js--input-form" placeholder="{{ getLanguage('type_your_number', 'receiver') }}"
value="{{ addressTypeEdit? addressTypeEdit.addressNumber }}" required>
</div>
{# NEIGHBORHOOD #}
<div class="cp cp-3">
<label for="addressNeighborhood{{ addressType }}">{{ getLanguage('district', 'profile') }}{{ req|raw }}</label>
<input type="text" id="{{ (addressType) ? 'partner-' }}receiver-addressNeighborhood" name="addressNeighborhood{{ addressType }}"
class="js--input-form" placeholder="{{ getLanguage('enter_district', 'receiver') }}"
value="{{ addressTypeEdit? addressTypeEdit.addressNeighborhood }}" required>
</div>
{# COMPLEMENT #}
<div class="cp cp-2">
<label for="addressComplement{{ addressType }}">{{ getLanguage('complement', 'profile') }}</label>
<input type="text" id="{{ (addressType) ? 'partner-' }}receiver-addressComplement" name="addressComplement{{ addressType }}"
class="js--input-form" placeholder="{{ getLanguage('type_your_complement', 'receiver') }}"
value="{{ addressTypeEdit? addressTypeEdit.addressComplement }}">
</div>
{# REFERENCE POINT #}
<div class="cp cp-2">
<label for="addressReferencePoint{{ addressType }}">{{ getLanguage('reference_point', 'receiver') }}</label>
<input type="text" id="{{ (addressType) ? 'partner-' }}receiver-addressReferencePoint" name="addressReferencePoint{{ addressType }}"
class="js--input-form" placeholder="{{ getLanguage('type_your_reference_point', 'receiver') }}"
value="{{ addressTypeEdit? addressTypeEdit.addressReferencePoint }}">
</div>
</div>