<div {{ attributes.defaults(stimulus_controller(this.shortName)) }}
      {{ stimulus_action('productlist-tableview-group', 'calculateTotal', 'change') }}
>
   <div class="variations-items">
      {% for var in this.variationsByValueId %}
         {% if var == null %}
            <div class="variations-wrapper missing"></div>
         {% else %}
            <div class="variations-wrapper">
               <twig:block name="input">
                  <div data-js-cart-product="{{ this.jsCartProduct(var.id)|json_encode }}"></div>
                  <twig:Product:DeliveryTime data-tooltip="{{ var.tooltip|default('')|raw }}" id_product="{{ this.id_product }}" id_variation="{{ var.id }}" show_deliveries_info="0"/>
               </twig:block>
               {% if this.hasVariations %}
                  <p class="variation-code" data-action="click->{{ this.shortName }}#copy"
                     data-tooltip="{{ 'tooltip.copy.text'|trans([], 'sections') }}"
                     data-{{ this.shortName }}-text-param="{{ 'copied'|trans([], 'sections') }}"
                     data-{{ this.shortName }}-copy-param="{{ this.variationEanOrCode(var) }}">{{ this.variationEanOrCode(var) }}</p>
               {% else %}
                  <p class="variation-code" data-action="click->{{ this.shortName }}#copy"
                     data-tooltip="{{ 'tooltip.copy.text'|trans([], 'sections') }}"
                     data-{{ this.shortName }}-text-param="{{ 'copied'|trans([], 'sections') }}"
                     data-{{ this.shortName }}-copy-param="{{ this.productEanOrCode }}">{{ this.productEanOrCode }}</p>
               {% endif %}
            </div>
         {% endif %}
      {% endfor %}
   </div>
</div>
