{if !$reviews}
   {$reviews = $product_reviews.reviews}
{/if}
<div class="reviews-list">
   {foreach $reviews as $review}
       {$translated_review = false}
      {* {if ($review.pros_original || $review.cons_original || $review.summary_original) and $review.id_language != $ctrl.active_language}
           {$translated_review = true}
       {/if}*}

      <div class="review-item">
         <div class="review-text">
            {if $review.summary}<p class="summary">{$review.summary}</p>{/if}
            {if $review.pros}
               <p class="pros">
                  <strong>{t}Líbí se{/t}</strong>
               </p>
                <p>
                    {$review.pros}
                </p>
            {/if}
            {if $review.cons}
               <p class="cons">
                  <strong>{t}Nelíbí se{/t}</strong>
               </p>
                <p>
                    {$review.cons}
                </p>
            {/if}
             <div class="product-bottom-review-wrapper">
                     {if $review.rating}
                        <div class="review-stars review-stars-{$review.rating|round} {$colorClass}">
                            {for $i=1 to 5}
                               <i class="fc {if $i > $review.rating|round}icons_star_empty{else}icons_star_full{/if}"></i>
                            {/for}
                        </div>
                     {/if}
                    <div class="review-data">
                       <p>
                          <span class="h4">{$review.user_name|default:$review.name|default:"{t}Anonymní{/t}"}</span>
                           {if $review.date}<span class="date">{$review.date|date_format:"%e.%-m.%Y"}</span>{/if}
                       </p>
                 </div>
                <p class="review-verified">
                    {if $review.verified}
                       <i class="fc icons_check-circle"></i>
                        {t}Recenze nakupujícího{/t}
                    {else}
                        {t}Recenze návštěvníka{/t}
                    {/if}
                    {$review.source}
                </p>
             </div>
            {ifmodule PRODUCTS_COLLECTIONS}
            {if $review.id_product != $body.product.id}
               <p class="review-collection-product">{t}Původně vloženo k{/t} <a
                          href="{url s=product IDproduct=$review.id_product TITLE=$review.product_title}"
                          title="{t}Zobrazit produkt{/t}">{$review.product_title}</a></p>
            {/if}
            {/ifmodule}
            <p class="review-report">
               <a href="" data-wpj-focus="{path('kupshop_content_contactform_sendform', ['type'=>'report-inappropriate-content', 'report_type'=>'reviews', 'content_id'=>{$review.id}])}" data-wpj-focus-ajax="1">
                  {t}Nahlásit{/t}
               </a>
            </p>

             {if $translated_review}
                 <div class="review-original">
                    <div class="review-original-author">
                       {if $review.id_language != $ctrl.active_language}
                          {get_domain_by_language id_language=$review.id_language assign='domain'}
                          <p>
                             <span class="country-flag" style="background-image: url('/common/static/images/flags/{$review.id_language|lower}.svg');"></span> {t}Od zákazníka z{/t} {$domain}
                          </p>
                       {/if}
                       <a href="#" class="show-original-review" data-opener="[data-original-review='{$review.id}']"
                          data-text-hide="{t}Skrýt originál{/t}" rel="noreferrer">
                           {t}Zobrazit originál{/t}
                       </a>
                    </div>
                    <div class="opener-content" data-original-review="{$review.id}">
                       <div class="review-text">
                           {if $review.summary_original}
                              <p class="summary">{$review.summary_original}</p>
                           {/if}
                           {if $review.pros_original}
                              <p class="pros">
                                 <strong>{t}Líbí se{/t}</strong>
                              </p>
                              <p>
                                  {$review.pros_original}
                              </p>
                           {/if}
                           {if $review.cons_original}
                              <p class="cons">
                                 <strong>{t}Nelíbí se{/t}</strong>
                              </p>
                              <p>
                                  {$review.cons_original}
                              </p>
                           {/if}
                       </div>
                    </div>
                 </div>
             {/if}
         </div>
      </div>
   {/foreach}
   <div data-more-reviews-container data-more-reviews style="display: none;"></div>
</div>
