{% sw_extends '@Storefront/storefront/component/buy-widget/configurator.html.twig' %}
{% block buy_widget_configurator %}
<div class="product-detail-configurator"
data-product-variations="true">
{% block buy_widget_configurator_form %}
<form>
{% block buy_widget_configurator_csrf %}
{% if elementId is defined and elementId is not null %}
{{ sw_csrf('frontend.cms.buybox.switch') }}
{% else %}
{{ sw_csrf('frontend.detail.switch') }}
{% endif %}
{% endblock %}
{% block buy_widget_configurator_groups %}
{% block buy_widget_configurator_group %}
<div class="product-detail-configurator-group">
{% sw_include '@Storefront/storefront/page/product-detail/configurator/select.html.twig' with{
'type': 'radio',
'label': true,
'sizeGuide': true,
'product': page.product
} %}
</div>
{% endblock %}
{% endblock %}
</form>
{% endblock %}
</div>
{% endblock %}
{% block buy_widget_configurator_option_radio_label %}
<label class="product-detail-configurator-option-label block px-4 py-2 transition rounded-sm bg-grey-50 font-accent font-bold text-base border border-transparent text-grey-900 cursor-pointer hover:border-grey-600 peer-checked:border-grey-900{% if isCombinableCls %} {{ isCombinableCls }}{% endif %} is-display-{{ displayType }}"
{% if displayType == 'color' and option.colorHexCode %}
style="background-color: {{ option.colorHexCode }}"
{% endif %}
title="{{ option.translated.name }}"
for="{{ optionIdentifier }}">
{% if displayType == 'media' and media %}
{% block buy_widget_configurator_option_radio_label_media %}
{% sw_thumbnails 'configurator-option-img-thumbnails' with {
media: media,
sizes: {
'default': '52px'
},
attributes: {
'class': 'product-detail-configurator-option-image',
'alt': option.translated.name,
'title': option.translated.name
}
} %}
{% endblock %}
{% elseif displayType == 'text' or
(displayType == 'media' and not media) or
(displayType == 'color' and not option.colorHexCode) %}
{% block buy_widget_configurator_option_radio_label_text %}
{{ option.translated.name }}
{% endblock %}
{% endif %}
</label>
{% endblock %}