{% trans_default_domain 'products' %}
<div {{ attributes }}>
   <div class="title-wrapper">
      <div>
         <h2 class="title">{{ this.title|default('review.title'|trans) }}</h2>
         {% if this.rating %}
            <twig:Product:Reviews:Rating id_product="{{ this.id_product }}" show_stars="{{ not this.show_stars_bottom }}"/>
         {% endif %}
      </div>
      {% if this.rating %}
        <twig:Product:Reviews:Rating id_product="{{ this.id_product }}" show_count="{{ true }}" show_stars="{{ this.show_stars_bottom }}"/>
      {% endif %}
   </div>
   {% if not this.userAlreadyRated %}
      <button
            type="button"
            class="btn btn-primary"
            data-wpj-modal="{{ path('kupshop_components_modal_modal', {template: 'reviewForm', id_product: this.id_product}) }}">
         {{ this.button_title|default('review.add.button'|trans) }}
      </button>
   {% endif %}
</div>
