<?php $__env->startSection('content'); ?>
    <!-- My Courses Section Start -->
    <section class="section-padding section-bg fix">
        <div class="container">
            <div class="dashboard-layout">
                <?php echo $__env->make('student.partials.sidebar', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

                <!-- Main Content Start -->
                <div class="dashboard-main">
                    <div class="section-title wow fadeInUp">
                        <h6><?php echo e(__('student.my_courses')); ?></h6>
                        <h2><?php echo e(__('student.enrolled_courses')); ?></h2>
                        <p><?php echo e(__('student.enrolled_courses_subtitle')); ?></p>
                    </div>

                    <div class="row g-4" style="margin-top: 30px;">
                        <?php $__empty_1 = true; $__currentLoopData = $enrollments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $enrollment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                            <div class="col-xl-6 col-lg-6 col-md-6 wow fadeInUp"
                                data-wow-delay="<?php echo e($enrollment['animation_delay']); ?>s">
                                <div class="mhq-courses-box-items mt-0">
                                    <div class="mhq-courses-image">
                                        <?php if($enrollment['featured_image']): ?>
                                            <img src="<?php echo e(asset('storage/' . $enrollment['featured_image'])); ?>"
                                                alt="<?php echo e($enrollment['course_title']); ?>">
                                        <?php else: ?>
                                            <img src="<?php echo e(asset('assets/front/img/home-1/courses/courses-01.jpg')); ?>"
                                                alt="<?php echo e($enrollment['course_title']); ?>">
                                        <?php endif; ?>
                                        <?php if($enrollment['course_category']): ?>
                                            <span class="post-box">
                                                <?php echo e($enrollment['course_category']); ?>

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

                                            </span>
                                        <?php endif; ?>
                                        <?php if($enrollment['is_pending']): ?>
                                            <span class="badge bg-warning position-absolute"
                                                style="top: 10px; right: 10px;">
                                                <?php echo e(__('student.pending_approval')); ?>

                                            </span>
                                        <?php elseif($enrollment['is_approved']): ?>
                                            <span class="badge bg-success position-absolute"
                                                style="top: 10px; right: 10px;">
                                                <?php echo e(__('student.enrolled_status')); ?>

                                            </span>
                                        <?php elseif($enrollment['is_completed']): ?>
                                            <span class="badge bg-info position-absolute" style="top: 10px; right: 10px;">
                                                <?php echo e(__('student.completed_status')); ?>

                                            </span>
                                        <?php endif; ?>
                                    </div>
                                    <div class="mhq-courses-content">
                                        <div class="star">
                                            <i class="fa-solid fa-star-sharp"></i>
                                            <i class="fa-solid fa-star-sharp"></i>
                                            <i class="fa-solid fa-star-sharp"></i>
                                            <i class="fa-solid fa-star-sharp"></i>
                                            <i class="fa-solid fa-star-sharp"></i>
                                        </div>
                                        <h3><a
                                                href="<?php echo e($enrollment['course_id'] ? route('student.courses.access', $enrollment['course_id']) : '#'); ?>"><?php echo e($enrollment['course_title']); ?></a>
                                        </h3>
                                        <ul class="post-date">
                                            <li>
                                                <?php if($enrollment['intro_video']): ?>
                                                    <a href="<?php echo e(asset('storage/' . $enrollment['intro_video'])); ?>"
                                                        class="icon video-popup">
                                                        <i class="fa-regular fa-circle-play"></i>
                                                    </a>
                                                <?php endif; ?>
                                                <?php echo e($enrollment['lesson_count']); ?><?php echo e(__('student.lessons_count_suffix')); ?>

                                            </li>
                                            <li>
                                                <div class="icon">
                                                    <i class="fa-regular fa-user"></i>
                                                </div>
                                                <?php if($enrollment['max_students']): ?>
                                                    <?php echo e(__('student.max_students_label', ['count' => $enrollment['max_students']])); ?>

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

                                                <?php endif; ?>
                                            </li>
                                        </ul>
                                        <div class="client-info-area">
                                            <div class="client-info">
                                                <?php if($enrollment['instructor_avatar']): ?>
                                                    <div class="img">
                                                        <img src="<?php echo e(asset('storage/' . $enrollment['instructor_avatar'])); ?>"
                                                            alt="<?php echo e($enrollment['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($enrollment['instructor_name']); ?>">
                                                    </div>
                                                <?php endif; ?>
                                                <?php echo e($enrollment['instructor_name']); ?>

                                            </div>
                                            <h2><?php echo e($enrollment['price_label']); ?></h2>
                                        </div>
                                        <?php if($enrollment['is_approved'] || $enrollment['is_completed']): ?>
                                            <a href="<?php echo e($enrollment['course_id'] ? route('student.courses.access', $enrollment['course_id']) : '#'); ?>"
                                                class="theme-btn py-2">
                                                <?php echo e(__('student.access_course_btn')); ?>

                                                <i class="fa-solid fa-arrow-up-right"></i>
                                            </a>
                                        <?php else: ?>
                                            <a href="<?php echo e($enrollment['course_id'] ? route('courses.show', $enrollment['course_id']) : '#'); ?>"
                                                class="theme-btn py-2" style="background: #ffc107; color: #000;">
                                                <i class="fas fa-clock me-2"></i> <?php echo e(__('student.pending_approval')); ?>

                                            </a>
                                        <?php endif; ?>
                                        <?php if($enrollment['enrolled_at']): ?>
                                            <p class="mt-2 mb-0 small text-muted">
                                                <i class="far fa-calendar me-1"></i>
                                                <?php echo e(__('student.enrolled_on')); ?> <?php echo e($enrollment['enrolled_at']->format('M d, Y')); ?>

                                            </p>
                                        <?php endif; ?>
                                    </div>
                                </div>
                            </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                            <div class="col-12">
                                <div class="alert alert-info text-center wow fadeInUp" data-wow-delay=".3s"
                                    style="padding: 60px 40px;">
                                    <div class="mb-4">
                                        <i class="fas fa-book-open" style="font-size: 64px; color: #6c757d;"></i>
                                    </div>
                                    <h4><?php echo e(__('student.no_courses_enrolled')); ?></h4>
                                    <p class="mb-4"><?php echo e(__('student.no_courses_enrolled_desc')); ?></p>
                                    <a href="<?php echo e(route('courses')); ?>" class="theme-btn">
                                        <?php echo e(__('student.browse_courses')); ?>

                                        <i class="fa-solid fa-arrow-up-right"></i>
                                    </a>
                                </div>
                            </div>
                        <?php endif; ?>
                    </div>
                    <?php echo e($enrollments->links()); ?>

                </div>
                <!-- Main Content End -->
            </div>
        </div>
    </section>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.student', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /Users/mahmudul/Codecanyone/edu_ex_full/Eduex_laravel/resources/views/student/my-courses.blade.php ENDPATH**/ ?>