{% extends "components/forms/input.html.twig" %}

{% set raw_labels = raw_labels ?? false %}

{% block element %}
    <select
        name="{{ name ?? id }}"
        id="{{ id }}"
        {% if required is defined and required == true %} required="required"{% endif %}
        {% if disabled is defined and disabled == true %} disabled="disabled"{% endif %}
        class="ui search dropdown nochosen"
    >
    {% for option_value, option_label in values %}
        <option
            value="{{ option_value }}"
            {% if option_value == value %} selected="selected"{% endif %}
        >
            {% if raw_labels == true %}
                {{ option_label|raw }}
            {% else %}
                {{ option_label }}
            {% endif %}
        </option>
    {% endfor %}
    </select>
{% endblock %}
