<div {{ attributes }} x-data="" translate="no">
    <label for="language-select" class="sr-only">{{ 'languageSelector.label'|trans({}, 'cms') }}</label>
    <select id="language-select"
            class="w-auto rounded-md border-0 py-0.5 pl-2 pr-8 text-xs text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-primary-600 sm:leading-6 dark:bg-gray-800 dark:text-white dark:ring-gray-700 {{ select_class|default('') }}"
            @change="window.location.href = $event.target.value">
        {% for option in options %}
            <option value="{{ content_url(app.request.attributes.get('pageModel'), {'_locale': option.locale}, true) }}" {% if option.locale == app.request.locale %}selected{% endif %} class="text-gray-900 dark:text-white">
                {{ option.name }}
            </option>
        {% endfor %}
    </select>
</div>
