{% sw_extends '@Storefront/storefront/component/buy-widget/configurator.html.twig' %}
{% block buy_widget_configurator_options %}
<div class="product-detail-configurator-options">
<wyn-select
class="product-detail-configurator-select-input"
adjust-to-biggest-option
aria-label="{{ group.translated.name }}"
name="{{ group.id }}"
>
{% for option in group.options %}
{% if elementId is defined and elementId is not null %}
{% set optionIdentifier = [group.id, option.id, elementId]|join('-') %}
{% else %}
{% set optionIdentifier = [group.id, option.id]|join('-') %}
{% endif %}
{% set isActive = false %}
{% if option.id in product.optionIds %}
{% set isActive = true %}
{% endif %}
{% block buy_widget_configurator_option %}
<wyn-option
id="{{ optionIdentifier }}"
value="{{ option.id }}"
{% if isActive %}selected="selected"{% endif %}
{% if not option.combinable %}disabled{% endif %}
>
{{ option.translated.name }}
{% block buy_widget_configurator_option_radio %}
{% endblock %}
</wyn-option>
{% endblock %}
{% endfor %}
</wyn-select>
</div>
{% endblock %}