<div data-wow-duration="1.5s" data-wow-delay="<?php echo e(($key + 1) * 0.2); ?>s"
    class="eg-card auction-card1 style-2 wow fadeInDown">
    <div class="auction-img">
        <?php if($productItem->sale_type == 1): ?>
            <span class="product-type"><?php echo e(translate('Auction')); ?></span>
        <?php else: ?>
            <span class="product-type bg-red"><?php echo e(translate('General')); ?></span>
        <?php endif; ?>
        <?php if( currentDate() < $productItem->start_date ): ?>
        <span class="product-type comming-soon"> <?php echo e(translate('Comning Soon')); ?> </span>
        <?php endif; ?>

        <?php if($productItem->features_image): ?>
            <img alt="Acution image" src="<?php echo e(asset('uploads/products/features/' . $productItem->features_image)); ?>">
        <?php else: ?>
            <img alt="Acution image" src="<?php echo e(asset('uploads/placeholder.jpg')); ?>">
        <?php endif; ?>

        <?php if($productItem->sale_type == 1): ?>
            <?php
                $auctionDate= currentDate() < $productItem->start_date ? $productItem->start_date : $productItem->end_date
           ?>
            <div class="auction-timer">
                <div class="countdown" id="timer<?php echo e($key); ?>"
                    data-live-end-date="<?php echo e(strtotime($auctionDate)); ?>"
                    data-product-id="<?php echo e($productItem->id); ?>">
                    <h4><span id="days<?php echo e($key); ?>"></span>D : <span id="hours<?php echo e($key); ?>"></span>H :
                        <span id="minutes<?php echo e($key); ?>"></span>M : <span id="seconds<?php echo e($key); ?>"></span>S
                    </h4>
                </div>
            </div>
        <?php endif; ?>
        <div class="author-area">
            <div class="author-emo">
                <?php if(fileExists('uploads/shop/', $productItem?->users?->shop?->logo) != false && $productItem?->users?->shop?->logo != null): ?>
                    <img src="<?php echo e(asset('uploads/shop/' .  $productItem?->users?->shop?->logo)); ?>" alt="Shop Logo">
                <?php else: ?>
                    <img src="<?php echo e(asset('uploads/placeholder.jpg')); ?>" alt="Shop Logo">
                <?php endif; ?>

            </div>
            <div class="author-name">
                <span><a href="<?php echo e(route('shop.details', $productItem->users->shop->slug)); ?>"> <?php echo e(translate('by')); ?>

                        <?php echo e('@' . $productItem->users?->shop?->name); ?></a></span>
            </div>
        </div>
    </div>
    <div class="auction-content">
        <h4><a
                href="<?php echo e(route('auction.details', $productItem->slug)); ?>"><?php echo e($productItem->getTranslation('name', $lang)); ?></a>
        </h4>
        <?php if($productItem->sale_type == 1): ?>

            <?php
                $latest_bid = latestBidPrice($productItem->id);

            ?>

            <?php if(isset($latest_bid->bid_amount)): ?>
                <p><?php echo e(translate('Current bid')); ?>:
                    <span><?php echo e(currency_symbol()); ?><?php echo e($latest_bid->bid_amount ?? $productItem->min_bid_price); ?></span>
                </p>
            <?php else: ?>
                <p><?php echo e(translate('Bidding Price')); ?>:
                    <span><?php echo e(currency_symbol()); ?><?php echo e($latest_bid->bid_amount ?? $productItem->min_bid_price); ?></span>
                </p>


            <?php endif; ?>
        <?php else: ?>
            <div class="price"><?php echo e(translate('Price')); ?> : <?php if($productItem->sale_price): ?>
                    <del><?php echo e(currency_symbol() . $productItem->price); ?></del>
                <span><?php echo e(currency_symbol() . $productItem->sale_price); ?></span><?php else: ?><span><?php echo e(currency_symbol() . $productItem->price); ?></span>
                <?php endif; ?>
            </div>
        <?php endif; ?>
        <div class="auction-card-bttm">
            <?php if($productItem->sale_type == 1): ?>
                <a href="<?php echo e(route('auction.details', $productItem->slug)); ?>"
                    class="eg-btn btn--primary btn--sm"><?php echo e(translate('Place a Bid')); ?></a>
            <?php else: ?>
                <a href="<?php echo e(route('auction.details', $productItem->slug)); ?>"
                    class="eg-btn btn--primary2 btn--sm"><?php echo e(translate('Buy Now')); ?></a>
            <?php endif; ?>
            <div class="share-area">
                <ul class="social-icons d-flex">
                    <li><a target="_blank"
                            href="https://www.facebook.com/sharer.php?u=<?php echo e(url('product/' . $productItem->slug)); ?>"><i
                                class="bx bxl-facebook"></i></a></li>
                    <li><a target="_blank"
                            href="https://twitter.com/intent/tweet?url=<?php echo e(url('product/' . $productItem->slug)); ?>&text=<?php echo e($productItem->getTranslation('name', $lang)); ?>"><i
                                class="bx bxl-twitter"></i></a></li>
                    <li><a target="_blank"
                            href="https://www.linkedin.com/shareArticle?url=<?php echo e(url('product/' . $productItem->slug)); ?>&title=<?php echo e($productItem->getTranslation('name', $lang)); ?>"><i
                                class="bx bxl-linkedin"></i></a></li>
                    <li><a target="_blank"
                            href="https://www.pinterest.com/pin/create/bookmarklet/?url==<?php echo e(url('product/' . $productItem->slug)); ?>"><i
                                class="bx bxl-pinterest"></i></a></li>
                </ul>
                <div>
                    <a href="#" class="share-btn"><i class='bx bxs-share-alt'></i></a>
                </div>
            </div>
        </div>
    </div>

</div>
<?php /**PATH C:\ServBay\www\bidout-update\resources\views/frontend/template-1/partials/live_auction.blade.php ENDPATH**/ ?>