

<?php $__env->startSection('title', 'Scholarships'); ?>

<?php $__env->startSection('content'); ?>

    <?php echo $__env->make('layouts.partials.page_header', [
        'title' => 'Scholarships',
        'breadcrumbs' => [
            ['label' => 'Home', 'url' => route('home')],
            ['label' => 'Scholarships', 'url' => '']
        ]
    ], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
    <!--Course Grid Start (Scholarships)-->
    <section class="course-grid">
        <div class="container">
            <div class="row">
                <!-- Sidebar Filters -->
                 <div class="col-xl-4 col-lg-5">
                <?php echo $__env->make('scholarships.partials.sidebar', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
</div>
                <!-- Main Content Grid -->
                <div class="col-xl-8 col-lg-7">
                    
<div class="course-grid__right">
                        <!-- Top Bar -->
                      <?php echo $__env->make('scholarships.partials.topbar', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                        <!-- Scholarships Grid -->
                        <div class="course-grid__right-content-box">
                            <div class="row">
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $scholarships; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $scholarship): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                                    <div class="col-xl-6">
                                        <div class="courses-two__single">
                                            <div class="courses-two__img-box">

                                                <!-- <div class="courses-two__heart">
                                                    <a href="<?php echo e(route('scholarships.show', $scholarship->slug)); ?>"></a>
                                                </div> -->
                                            </div>
                                            <div class="courses-two__content">
                                                <div class="courses-two__doller-and-review">
                                                    <div class="courses-two__doller">
                                                        <p>€<?php echo e(number_format($scholarship->amount)); ?></p>
                                                    </div>
                                                    <div class="courses-two__review">
                                                        <p><i class="icon-chart-simple"></i> <?php echo e(ucfirst($scholarship->program_level)); ?>

                                                        </p>
                                                    </div>
                                                </div>
                                                <h3 class="courses-two__title"><a
                                                        href="<?php echo e(route('scholarships.show', $scholarship->slug)); ?>"><?php echo e($scholarship->title); ?></a>
                                                </h3>
                                                <div class="courses-two__btn-and-client-box">
                                                  
                                                    <div class="courses-two__client-box">
                                                        <!-- <div class="courses-two__client-img">
                                                            <img
                                                                src="<?php echo e($scholarship->country->flag_path ? asset('storage/'.$scholarship->country->flag_path) : asset('images/resources/courses-two-client-img-1.jpg')); ?>"
                                                                alt="">
                                                        </div> -->
                                                        <div class="courses-two__client-content">
                                                            <h6><?php echo e($scholarship->country->name); ?></h6>
                                                            <p>
                                                                Deadline: <?php echo e($scholarship->deadline->format('M d, Y')); ?></p>
                                                        </div>
                                                    </div>
                                                      <div class="courses-two__btn-box">
                                                        <a href="<?php echo e(route('scholarships.show', $scholarship->slug)); ?>"
                                                           class="thm-btn-two">
                                                            <span>Apply Now</span>
                                                            <i class="icon-angles-right"></i>
                                                        </a>
                                                    </div>
                                                </div>
                                                <ul class="courses-two__meta list-unstyled">
                                               
                                                    <li>
                                                        <div class="icon"><span class="icon-book"></span></div>
                                                        <p><?php echo e($scholarship->university->name ?? 'University'); ?></p>
                                                    </li>
                                                    <li>
                                                        <div class="icon"><span class="icon-clock"></span></div>
                                                        <p><?php echo e($scholarship->deadline->diffForHumans()); ?></p>
                                                    </li>
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                                    <div class="col-12 text-center py-5">
                                        <h4>No scholarships found.</h4>
                                    </div>
                                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </div>
                        </div>

                        <!-- Pagination -->
                        <div class="blog-list__pagination">
                            <?php echo e($scholarships->appends(request()->except('page'))->links('vendor.pagination.custom')); ?>

                        </div>



                </div>

            </div>
        </div>
     </div>
</section>
    <!--Course Grid End-->



<?php $__env->stopSection(); ?>





<?php $__env->startPush('scripts'); ?>
    <script>
        // Initialize jQuery UI slider for price range
        $(function () {
            $("#slider-range").slider({
                range: true,
                min: <?php echo e($minAmount); ?>,
                max: <?php echo e($maxAmount); ?>,
                values: [<?php echo e($currentMin); ?>, <?php echo e($currentMax); ?>],
                slide: function (event, ui) {
                    $(".min").val(ui.values[0]);
                    $(".max").val(ui.values[1]);
                    $("#amount_min").val(ui.values[0]);
                    $("#amount_max").val(ui.values[1]);
                    $(".course-grid__price-filter-title").text("Amount: €" + ui.values[0] + " - €" + ui.values[1]);
                }
            });
            $(".min").val($("#slider-range").slider("values", 0));
            $(".max").val($("#slider-range").slider("values", 1));
            $("#amount_min").val($("#slider-range").slider("values", 0));
            $("#amount_max").val($("#slider-range").slider("values", 1));
        });

        // Sorting dropdown
        function updateSort(value) {
            var parts = value.split('-');
            var sort = parts[0];
            var direction = parts[1];
            var url = new URL(window.location.href);
            url.searchParams.set('sort', sort);
            url.searchParams.set('direction', direction);
            window.location.href = url.toString();
        }
    </script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH D:\Sasi\resources\views/scholarships/index.blade.php ENDPATH**/ ?>