<?php $__env->startSection('header'); ?>
    <!--inner-header-->
    <div class="inner-header" style="background-image: url(<?php echo e(asset($pageDetails->image ?? 'assets/web/images/news.png')); ?>);">
        <div class="info">
            <h3><?php echo e($pageDetails->description); ?></h3>
        </div>
        <div class="btn-scroll-down">
            <a href="#"><?php echo e(__('main.scroll_down')); ?></a>
        </div>
    </div>
    <!--End-inner-header-->
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <!-- ------------------------ companies-search ------------------------ -->
    <section class="companies-search bg-gray">
        <div class="container">
            <div class="color-title text-center">
                <h2><?php echo e(__('main.our_companies')); ?></h2>
            </div>
            <form>
                <div class="row mt-5 justify-content-center">
                    <div class="col-lg-5">
                        <div class="form-group group-select">
                            <select name="company_id" class="custom-select company_search">
                                <option value=""><?php echo e(__('main.all_companies')); ?></option>
                                <?php $__currentLoopData = $companies; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $company): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($company->id); ?>"><?php echo e($company->name); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                    </div>
                </div>
            </form>
        </div>

    </section>
    <!-- ------------------------- news  ------------------------ -->
    <section class="blog section-padding">
        <div class="container">
            <!-- Swiper -->
            <div class="swiper-blog company_search_result">
                <div class="slick-nav">
                    <?php $__currentLoopData = $years; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $year): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <p><?php echo e($year); ?></p>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                </div>
                <div class="slick-slider">

                    <?php $__currentLoopData = $allYears; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $year => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="blog-slide">
                            <?php $__currentLoopData = $value; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="items <?php if(request('id') != null && $val['id'] == request('id')): ?> currentItem <?php endif; ?>">
                                    <div class="info text-left">
                                        <?php
                                            $date= date('M Y', strtotime($val['added_year']));
                                            $description= strip_tags($val['description']);
                                            $newsTitle = str_split($val['title'], round(mb_strlen($val['title'])/2));
                                            // $description = str_split($description, round(mb_strlen($description)/2));
                                        ?>
                                        <h6 class="text-uppercase"><?php echo e($val['company_name']); ?> <span><?php echo e($date); ?></span></h6>
                                        
                                        <h3><?php echo $val['title']; ?></h3>

                                        <p><?php echo $description; ?></p>
                                        
                                    </div>
                                    <div class="img">
                                        <img src="<?php echo e(asset($val['company_logo'])); ?>" alt="<?php echo e($val['title']); ?>">
                                        <img src="<?php echo e(asset($val['image'] ?? $val['AImage'] ?? $val['company_logo'])); ?>" alt="<?php echo e($val['title']); ?>" class="mirror">
                                        <span class="date"><?php echo e($date); ?></span>
                                        <span class="blog-title">
                                        <strong><?php echo e($val['title']); ?></strong>
                                        
                                    </span>
                                    </div>
                                    <span class="cls"><i class="fas fa-times"></i> close</span>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                </div>
            </div>
        </div>
        <div class="overlay"></div>
    </section>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('inner_js'); ?>
    <script>
        var route = "<?php echo e(route('getCompanyNews')); ?>"
    </script>
    <script src="<?php echo e(asset('assets/web/js/news.js')); ?>"></script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('web.layouts.container', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\wamp64\www\nesma\resources\views/web/news/index.blade.php ENDPATH**/ ?>