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

<section class="our-events">
    <div class="container-fluid">
        
        <div class="bar-title">
            <h5>
                <a href=""><img src="img/leap-white.png" alt="" />
                    <span> Our Events </span>
                </a>
            </h5>
        </div>
        
        <div>
            <img src="<?php echo e(url('public/images/soty.png')); ?>" alt="image not found"
                style="width:100%; height:50%;" />
        </div>

        
        <?php if($events->where('event_category', 'upcoming')->count()): ?>
            <div class="row">
                <div class="col-12">
                    <div class="titile">
                        <h4>Upcoming Events</h4>
                    </div>
                </div>
            </div>
            <div class="row g-3">
                <?php $__currentLoopData = $events->where('event_category', 'upcoming'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $event): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="col-xl-4 col-lg-4 col-md-6 col-sm-12">
                        <div class="card">
                            <div class="card-body">
                                <div class="single-event">
                                    <div class="event-img">
                                        <img src="<?php echo e(URL::to('public/images/' . $event->image)); ?>" alt="<?php echo e($event->title); ?>" />
                                    </div>
                                    <div class="event-content">
                                        <div class="schadule-badge">
                                            <span><?php echo e($event->start_date); ?></span>
                                        </div>
                                        <div class="infos">
                                            <h5><?php echo e($event->session['title']); ?></h5>
                                            <p>
                                                <i class="fa fa-calendar"></i>
                                                <span><?php echo e($event->start_date); ?> - <?php echo e($event->end_date); ?></span>
                                            </p>
                                            <address>
                                                <i class="fa fa-map-marker"></i>
                                                <span><?php echo e($event->location); ?></span>
                                            </address>
                                        </div>
                                        <div class="events-buttons">
                                            <a href="<?php echo e(url('eventdetails/'.$event->id)); ?>" class="btn">View event</a>
                                            <a href="#" class="btn" disabled>Register Now</a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        <?php endif; ?>

        
        <?php if($events->where('event_category', 'running')->count()): ?>
            <div class="row">
                <div class="col-12">
                    <div class="titile">
                        <h4>Running Events</h4>
                    </div>
                </div>
            </div>
            <div class="row g-3">
                <?php $__currentLoopData = $events->where('event_category', 'running'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $event): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="col-xl-4 col-lg-4 col-md-6 col-sm-12">
                        <div class="card">
                            <div class="card-body">
                                <div class="single-event">
                                    <div class="event-img">
                                        <img src="<?php echo e(URL::to('public/images/' . $event->image)); ?>" alt="<?php echo e($event->title); ?>" />
                                    </div>
                                    <div class="event-content">
                                        <div class="schadule-badge">
                                            <span><?php echo e($event->start_date); ?></span>
                                        </div>
                                        <div class="infos">
                                            <h5><?php echo e($event->session['title']); ?></h5>
                                            <p>
                                                <i class="fa fa-calendar"></i>
                                                <span><?php echo e($event->start_date); ?> - <?php echo e($event->end_date); ?></span>
                                            </p>
                                            <address>
                                                <i class="fa fa-map-marker"></i>
                                                <span><?php echo e($event->location); ?></span>
                                            </address>
                                        </div>
                                        <div class="events-buttons">
                                            <a href="<?php echo e(url('eventdetails/'.$event->id)); ?>" class="btn">View event</a>
                                            <a href="<?php echo e(URL::to('/registration/')); ?>" class="btn">Register Now</a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        <?php endif; ?>

        
        <?php if($events->where('event_category', 'completed')->count()): ?>
            <div class="row">
                <div class="col-12">
                    <div class="titile">
                        <h4>Completed Events</h4>
                    </div>
                </div>
            </div>

            
            <div class="row g-3">
                <?php $__currentLoopData = $events->where('event_category', 'completed'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $event): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="col-xl-4 col-lg-4 col-md-6 col-sm-12">
                        <div class="card">
                            <div class="card-body">
                                <div class="single-event">
                                    <div class="event-img">
                                        <img src="<?php echo e(URL::to('public/images/' . $event->image)); ?>" alt="<?php echo e($event->title); ?>" />
                                    </div>
                                    <div class="event-content">
                                        <div class="schadule-badge">
                                            <span><?php echo e($event->start_date); ?></span>
                                        </div>
                                        <div class="infos">
                                            <h5><?php echo e($event->session['title']); ?></h5>
                                            <p>
                                                <i class="fa fa-calendar"></i>
                                                <span><?php echo e($event->start_date); ?> - <?php echo e($event->end_date); ?></span>
                                            </p>
                                            <address>
                                                <i class="fa fa-map-marker"></i>
                                                <span><?php echo e($event->location); ?></span>
                                            </address>
                                        </div>
                                        <div class="events-buttons">
                                            <a href="<?php echo e(url('eventdetails/'.$event->id)); ?>" class="btn">View event</a>
                                            <a href="#" class="btn" disabled>Register Now</a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        <?php endif; ?>

    </div>
</section>


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

<?php $__env->startSection('footer'); ?>
    <?php echo $__env->make('layouts.footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>