<?php $__empty_1 = true; $__currentLoopData = $courses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $course): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
    <?php
        $lessonCount = $course->topics->sum(function ($topic) {
            return $topic->lessons->count();
        });
        $price =
            $course->pricing_model === 'free'
                ? __('frontend.free')
                : currency_format($course->sale_price ?? $course->regular_price ?? 0);
        $delay = ($index % 6) * 0.2;
    ?>
    <div class="col-xl-6 col-lg-6 col-md-6 wow fadeInUp" data-wow-delay="<?php echo e($delay); ?>s">
        <div class="mhq-courses-box-items mt-0">
            <div class="mhq-courses-image">
                <?php if($course->featured_image): ?>
                    <img src="<?php echo e(asset('storage/' . $course->featured_image)); ?>" alt="<?php echo e($course->title); ?>">
                <?php else: ?>
                    <img src="<?php echo e(asset('assets/front/img/home-1/courses/courses-01.jpg')); ?>" alt="<?php echo e($course->title); ?>">
                <?php endif; ?>
                <?php if($course->category): ?>
                    <span class="post-box">
                        <?php echo e(ucfirst($course->category)); ?>

                    </span>
                <?php endif; ?>
                <?php if($course->is_live_course): ?>
                    <span class="post-box" style="left: auto; right: 20px; background-color: #dc3545; border-color: #dc3545;">
                        <i class="fas fa-broadcast-tower me-1"></i> <?php echo e(__('frontend.live')); ?>

                    </span>
                <?php endif; ?>
            </div>
            <div class="mhq-courses-content">
                <div class="star">
                    <?php $averageRating = round($course->average_rating ?? 0); ?>
                    <?php for($i = 1; $i <= 5; $i++): ?>
                        <i
                            class="fa-solid fa-star-sharp <?php echo e($i <= $averageRating ? 'text-warning' : 'text-muted'); ?>"></i>
                    <?php endfor; ?>
                </div>
                <h3><a href="<?php echo e(route('courses.show', $course->id)); ?>"><?php echo e($course->title); ?></a></h3>
                <ul class="post-date">
                    <li>
                        <?php if($course->intro_video): ?>
                            <a href="<?php echo e(asset('storage/' . $course->intro_video)); ?>" class="icon video-popup">
                                <i class="fa-regular fa-circle-play"></i>
                            </a>
                        <?php endif; ?>
                        <?php echo e($lessonCount); ?>+ <?php echo e(__('frontend.lessons')); ?>

                    </li>
                    <li>
                        <div class="icon">
                            <i class="fa-regular fa-user"></i>
                        </div>
                        <?php if($course->max_students): ?>
                            <?php echo e(__('frontend.max')); ?> <?php echo e($course->max_students); ?> <?php echo e(__('frontend.students')); ?>

                        <?php else: ?>
                            <?php echo e(__('frontend.unlimited')); ?>

                        <?php endif; ?>
                    </li>
                </ul>
                <div class="client-info-area">
                    <div class="client-info">
                        <?php if($course->instructor && $course->instructor->profile_photo): ?>
                            <div class="img">
                                <img src="<?php echo e(asset('storage/' . $course->instructor->profile_photo)); ?>"
                                    alt="<?php echo e($course->instructor->name); ?>">
                            </div>
                        <?php else: ?>
                            <div class="img">
                                <img src="<?php echo e(asset('assets/front/img/home-1/courses/client-01.png')); ?>"
                                    alt="<?php echo e($course->instructor->name ?? __('frontend.instructor')); ?>">
                            </div>
                        <?php endif; ?>
                        <?php echo e($course->instructor->name ?? __('frontend.instructor')); ?>

                    </div>
                    <h2><?php echo e($price); ?></h2>
                </div>
                <a href="<?php echo e(route('courses.show', $course->id)); ?>" class="theme-btn">
                    <?php echo e(__('frontend.enroll_now')); ?>

                </a>
            </div>
        </div>
    </div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
    <div class="col-12">
        <div class="alert alert-info text-center">
            <p><?php echo e(__('frontend.no_courses_found')); ?></p>
        </div>
    </div>
<?php endif; ?>
<?php /**PATH /Users/mahmudul/Codecanyone/edu_ex_full/Eduex_laravel/resources/views/courses/partials/course-list.blade.php ENDPATH**/ ?>