<?php 
/**
 * Webkul Software.
 *
 * @category  Webkul
 * @package   Webkul_Marketplace
 * @author    Webkul
 * @copyright Copyright (c) Webkul Software Private Limited (https://webkul.com)
 * @license   https://store.webkul.com/license.html
 */

/** @var $block \Webkul\Marketplace\Block\Account\Dashboard */

$reviewcollection = $block->getReviewcollection();
?>
<div class="wk-mp-design wk-mp-design2">
    <fieldset class="fieldset info wk-mp-fieldset">
        <legend class="legend">
            <span><?= /* @noEscape */ __('Latest Comments & Reviews') ?></span>
        </legend>
        <div class="grid">
            <div class="hor-scroll">
                <?php
                if (count($reviewcollection)==0) { ?>
                    <div class="wk-emptymsg">
                        <?= /* @noEscape */ __('No comment & review available'); ?>
                    </div>
                    <?php
                } else {
                    $i = 0;
                    foreach ($reviewcollection as $keyed) {
                        $name=$block->getCustomer()->load($keyed->getBuyerId())->getName();
                        $i++; ?>
                        <div class="wk-orderbox <?php if ($i==1) { echo "wk-first-order"; }?>">
                            <div class="wk-mp-dashboard-review-container">
                                <div class="wk-orderbox-content1">
                                    <div class="wk-feedback-details">
                                        <div class="mpfeedback">
                                            <div class="price">
                                                <span class="wk-ordertitle-label wk-span">
                                                    <?= /* @noEscape */ __('Price') ?>
                                                </span>
                                                <span class="wk-ordertitle-label">:</span>
                                                <div class="ratingslider-box">
                                                    <div class="rating" style="width:<?= /* @noEscape */ ceil($keyed['feed_price']);?>%;"></div>
                                                </div>
                                                <div class="clear"></div>
                                            </div>
                                            <div class="value">
                                                <span class="wk-ordertitle-label wk-span"><?= /* @noEscape */ __('Value') ?> </span><span class="wk-ordertitle-label">:</span>
                                                <div class="ratingslider-box" >
                                                    <div class="rating" style="width:<?= /* @noEscape */ ceil($keyed['feed_value']);?>%;"></div>
                                                </div>
                                                <div class="clear"></div>
                                            </div>
                                            <div class="quality">
                                                <span class="wk-ordertitle-label wk-span"><?= /* @noEscape */ __('Quality') ?> </span><span class="wk-ordertitle-label">:</span>
                                                <div class="ratingslider-box">
                                                    <div class="rating" style="width:<?= /* @noEscape */ ceil($keyed['feed_quality']);?>%;"></div>
                                                </div>
                                                <div class="wk-clear"></div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="wk-feedback-desc">
                                        <div class="comment"><?= $block->escapeHtml($keyed['feed_review']); ?> </div>
                                    </div>
                                </div>
                                <div class="wk-orderbox-content2">
                                    <div class="wk-orderbox-details">
                                        <span class="wk-title-label"><?= /* @noEscape */ __('Customer: ');?></span>
                                        <span class="wk-label"><?= /* @noEscape */ $name;?></span>&nbsp;&nbsp;
                                        <span class="wk-title-label"><?= /* @noEscape */ __('Date: ');?></span>
                                        <span class="wk-label"><?= /* @noEscape */ $keyed['created_at'] ?></span>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="wk-clear"></div>
                        <?php
                    } ?>
                    <?php
                } ?>
            </div>
        </div>
    </fieldset>
</div>
