<?php
/**
 * @var $title string
 * @var $lots array
 * @var $args array
 * @var $limit int
 * @var $hiddenPrice boolean
 * @var $showEstimatedPriceInItemsList string
 * @var $displayStartPriceInCatalog string
 * @var $loadmore int
 */

use auctionforge\inc\helpers\View;
if (!empty($lots)) {
    ?>
    <div class="bp-widget-block">
        <div class="bt-main__title"><?= $title ?></div>
        <?php
        $total = count($lots);
        $loadMoreBtn = true;

        if (!$loadmore || ($limit == -1 || $limit > $total)) {
            $loadMoreBtn = false;
        }

        echo View::render('templates.widgets._lot', array(
            'lots' => $lots,
            'loadMoreBtn' => $loadMoreBtn,
            'hiddenPrice' => $hiddenPrice,
            'showEstimatedPriceInItemsList' => $showEstimatedPriceInItemsList,
            'displayStartPriceInCatalog' => $displayStartPriceInCatalog,
            'mobile_cols' => isset($mobile_cols) ? intval($mobile_cols) : 2
        ));
        ?>
    </div>
<?php } ?>