<div class="wsb-form__field {{ field.type }}" id="wsb-form-field-{{ field.name }}">
    {{ include('label.twig') }}
    {% if field.type is same as("textarea") %}
        <textarea name="{{ field.name }}" data-control title="{{ field.label }}"
                                    {% if field.required %} required {% endif %}
                {% if event.state.closed() %} disabled {% endif %}
                                    style="height : 90px ;" cols="30" rows="10"></textarea>
    {% elseif field.type is same as ("select") %}
        <select name="{{ field.name }}" title="{{ field.label }}" data-control
                {% if field.required %} required {% endif %}
                {% if event.state.closed() %} disabled {% endif %}
        >
            {% for option in field.options %}
                <option value="{{ option.value }}">{{ option.label }}</option>
            {% endfor %}
        </select>
    {% elseif field.type is same as("country") %}
        <select name="{{ field.name }}" title="{{ field.label }}"
                {% if field.required %} required {% endif %}
                {% if event.state.closed() %} disabled {% endif %}
                data-control
        >
            <option value="" selected disabled>{{ wsb_t('form.country') }}</option>
            {% for code, name in countries %}
                <option value="{{ code }}">{{ name }}</option>
            {% endfor %}
        </select>
    {% elseif field.type is same as("checkbox") %}
        <input name="{{ field.name }}" id="{{ field.name }}" type="checkbox"
                {% if field.required %} required {% endif %}
                {% if event.state.closed() %} disabled {% endif %}
               value="yes" data-control/>
        <label class="wsb-checkbox" for="{{ field.name }}">
            {{ field.label | raw }}
        </label>
    {% elseif field.type is same as("ticket") %}
        {{ include('ticket.twig') }}
    {% else %}
        {{ include('input.twig') }}
    {% endif %}
</div>
{% if field.type is same as("ticket") and field.tickets.validate_tax %}
<div class="wsb-form__field" style="display:none;" id="wsb-form-tax-widget">
	<label class="wsb-label">{{ wsb_t("tax.widget.tax_id") }}</label>
	<div class="wsb-form__tax-widget">
		<div class="wsb-form__tax-widget-input">
		<input name="tax_id" title="tax" type="text" data-tax-widget-value/>
		<input name="tax_intent_id" type="hidden" data-control data-tax-intent-id/>
		</div>
		<div class="wsb-form__tax-widget-buttons">
		<a class="wsb-form__tax-widget-apply" data-tax-widget-apply>{{ wsb_t("tax.widget.apply") }}</a>
		<a class="wsb-form__tax-widget-clear" data-tax-widget-clear>{{ wsb_t("tax.widget.clear") }}</a>
		</div>
		<div class="wsb-form__tax-widget-message"><div data-tax-widget-message></div></div>
	</div>
</div>
{% endif %}
