{% trans_default_domain 'products' %}
<div {{ attributes.defaults(stimulus_controller(this.shortName, {
   componentKey: this.masterProductId,
   productId: this.id_product,
})) }}>
   <div class="inner-content">
      <a href="{{ this.url }}" class="product">
         {% if this.thumbnail %}
            <twig:Picture class="img-responsive" thumbnail="{{ this.thumbnail }}" type="product_cart"></twig:Picture>
         {% endif %}
         <span class="product-name">{{ this.title }}</span>
      </a>
      {% if this.variations %}
         <select class="form-control" name="note[set_variation][{{ this.id_product }}]" {{ stimulus_target(this.shortName, 'variationSelect') }}>
            {% if not this.selectedVariation %}<option value="" selected disabled>{{ 'variations.select'|trans }}</option>{% endif %}
            {% for value in this.variations %}
               <option value="{{ value.id }}">{{ value.title }}</option>
            {% endfor %}
         </select>
      {% endif %}
   </div>
</div>
