{% set customerCountry = customer is not empty ? customer.getCountry() : null %}
{% set guessedCountryIso = customerCountry is not null ? customerCountry.getCountrycode() : demi_getGuessedCountry() %}
<div class="form-group">
<label class="form-box form-box--gray">
<span class="form-box__label">{{ 'demi.booking.checkout.country'|trans }} *</span>
<select name="country" class="form-box__content form-control {{ class is defined ? class : '' }}" required
autocomplete="country">
{% for country in demi_getSortedCountries([], isMerchandise ? true : false) %}
{% set isSelected = guessedCountryIso == country["countrycode"] %}
<option value="{{ country["countrycode"] }}" {{ isSelected ? ' selected="selected"' : '' }}>{{ country["name"] }}</option>
{% endfor %}
</select>
<span class="demi-icon demi-icon-chevron-down form-box__select-icon" aria-hidden="true"></span>
</label>
<div class="form-errors"></div>
</div>