{block name='productdetails-review-item'}
    {et_isShopVersionAtLeast value="5.6.0-rc.2" assign='shopIsAtLeast56'}
    <div id="comment{$oBewertung->kBewertung}" class="row review-comment {if $Einstellungen.bewertung.bewertung_hilfreich_anzeigen === 'Y' && JTL\Session\Frontend::getCustomer()->getID() > 0 && JTL\Session\Frontend::getCustomer()->getID() !== $oBewertung->kKunde}use_helpful{/if} {if isset($bMostUseful) && $bMostUseful}most_useful{/if}">
        {* Number of people who found this review helpfull *}
        {block name='productdetails-review-item-helpful'}
            {if $oBewertung->nHilfreich > 0}
            <div class="col col-12 review-helpful-total">
                <small class="text-muted-util">
                    {if $oBewertung->nHilfreich > 0}
                        {$oBewertung->nHilfreich}
                    {else}
                        {lang key='nobody' section='product rating'}
                    {/if}
                    {lang key='from' section='product rating'} {$oBewertung->nAnzahlHilfreich}
                    {if $oBewertung->nAnzahlHilfreich > 1}
                        {lang key='ratingHelpfulCount' section='product rating'}
                    {else}
                        {lang key='ratingHelpfulCountExt' section='product rating'}
                    {/if}
                </small>
            </div>
            {/if}
        {/block}

        {block name='productdetails-review-item-content'}
            <div class="col col-12">
                <div class="row" itemprop="review" itemscope itemtype="https://schema.org/Review">
                    {block name='productdetails-review-item-title'}{/block}

                    {block name='productdetails-review-item-details'}
                        <div class="col-12 col-lg-8">
                            <blockquote>
                                {block name='productdetails-review-item-details-header'}
                                    <header class="review-comment-header">
                                        <span class="subheadline" itemprop="name">
                                            {$oBewertung->cTitel}
                                        </span>

                                        {block name='productdetails-review-item-comment-include-rating'}
                                            {include file='productdetails/rating.tpl' stars=$oBewertung->nSterne}
                                        {/block}
                                    </header>
                                {/block}

                                <p itemprop="reviewBody">{$oBewertung->cText|nl2br}</p>
                            </blockquote>

                            <meta itemprop="thumbnailURL" content="{$Artikel->cVorschaubildURL}">

                            {if !empty($oBewertung->cAntwort)}
                                {block name='productdetails-review-item-details-reply'}
                                    <div class="review-reply">
                                        <span class="subheadline">{lang key='reply' section='product rating'} {$cShopName}:</span>
                                        <blockquote>
                                            <p>{$oBewertung->cAntwort}</p>
                                            <div class="blockquote-footer">{$oBewertung->AntwortDatum}</div>
                                        </blockquote>
                                    </div>
                                {/block}
                            {/if}
                        </div>
                    {/block}

                    {block name='productdetails-review-item-review'}
                        <div class="col-12 col-lg-2 offset-lg-2">
                            {block name='productdetails-review-item-rating'}
                                <div itemscope itemprop="reviewRating" itemtype="https://schema.org/Rating">
                                    {block name='productdetails-review-item-include-rating'}
                                        {include file='productdetails/rating.tpl' stars=$oBewertung->nSterne}
                                    {/block}

                                    <meta itemprop="ratingValue" content="{$oBewertung->nSterne}" />
                                    <meta itemprop="bestRating" content="5" />
                                    <meta itemprop="worstRating" content="1" />
                                </div>
                            {/block}

                            {block name='productdetails-review-item-author'}
                                <div class="review-author" itemprop="author" itemscope itemtype="https://schema.org/Person">
                                    <span itemprop="name">{$oBewertung->cName}</span>
                                </div>
                                <div class="review-date">
                                    <meta itemprop="datePublished" content="{$oBewertung->dDatum}" />{$oBewertung->Datum}
                                    {block name='productdetails-review-item-details-verified-purchase'}
                                        {if !empty($oBewertung->wasPurchased)}
                                            <div class="verified-purchase small">({lang key='verifiedPurchase' section='product rating'})</div>
                                        {/if}
                                    {/block}
                                </div>
                            {/block}
                            {block name='productdetails-review-item-details-has-credit-bonus'}
                                {if $shopIsAtLeast56}
                                    {if !empty($oBewertung->hasCreditBonus)}
                                        <div class="has-credit-bonus small mt-2 text-muted"
                                          data-toggle="tooltip"
                                          data-placement="auto"
                                          title="{lang key='hasCreditBonusDesc' section='product rating'}">
                                            {lang key='hasCreditBonus' section='product rating'}
                                        </div>
                                    {/if}
                                {/if}
                            {/block}

                            {if $Einstellungen.bewertung.bewertung_hilfreich_anzeigen === 'Y'}
                                {if JTL\Session\Frontend::getCustomer()->getID() > 0 && JTL\Session\Frontend::getCustomer()->getID() !== $oBewertung->kKunde}
                                    {block name='productdetails-review-item-buttons'}
                                        <div class="form-row review-helpful" id="help{$oBewertung->kBewertung}">
                                            <div class="col">
                                                <button
                                                    class="btn btn-sm btn-icon-primary btn-icon btn-icon-primary js-helpful badge-circle-1 badge-circle-no-sizes {if (int)$oBewertung->rated === 1}on-list{/if}"
                                                    title="{lang key='yes'}"
                                                    name="hilfreich_{$oBewertung->kBewertung}"
                                                    type="submit"
                                                    data-review-id="{$oBewertung->kBewertung}"
                                                >
                                                    <i class="{et_getIcon key="voteUp"}"></i>
                                                </button>
                                                <b><span class="d-block" data-review-count-id="hilfreich_{$oBewertung->kBewertung}">{$oBewertung->nHilfreich}</span></b>
                                            </div>
                                            <div class="col">
                                                <button
                                                    class="btn btn-sm btn-icon-primary btn-icon js-helpful badge-circle-1 badge-circle-no-sizes {if $oBewertung->rated !== null && (int)$oBewertung->rated === 0}on-list{/if}"
                                                    title="{lang key='no'}"
                                                    name="nichthilfreich_{$oBewertung->kBewertung}"
                                                    type="submit"
                                                    data-review-id="{$oBewertung->kBewertung}"
                                                >
                                                    <i class="{et_getIcon key="voteDown"}"></i>
                                                </button>
                                                <b><span class="d-block" data-review-count-id="nichthilfreich_{$oBewertung->kBewertung}">{$oBewertung->nNichtHilfreich}</span></b>
                                            </div>
                                        </div>
                                    {/block}
                                {/if}
                            {/if}
                        </div>
                    {/block}
                </div>
            </div>
        {/block}
    </div>
{/block}
