{% extends 'forms/fields/select/selectize.html.twig' %}

{% block options %}
    {{ parent() }}
    {% set current = gantry.menu.getDefaultMenuName() %}
    {% for menu_name,menu_title in gantry.menu.getMenuOptions() %}
        <option
                {# required attribute structures #}
                {% if menu_name == value %}selected="selected"{% endif %}
                value="{{ menu_name }}"
                {# non-gloval attribute structures #}
                {% if field.options.disabled in ['on', 'true', 1] %}disabled="disabled"{% endif %}
                >{{ menu_title }}{{ (current == menu_name and gantry.menu.hasDefaultMenu()) ? ' ★' : '' }}</option>
    {% endfor %}
{% endblock %}
