<?php
    $banner = getContent('banner.content', true);
    $categories = App\Models\Category::where('status', 1)
        ->orderByRaw('RAND()')
        ->latest()
        ->take(10)
        ->get();
    $tags = App\Models\Tag::where('status', 1)
        ->orderByRaw('RAND()')
        ->take(5)
        ->get();
?>
<!--========================== Banner Section Start ==========================-->
<?php if($general->theme == 1): ?>
    <section class="banner-section">
        <div class=" container">
            <div class="banner-thumb">
                <div class="row">
                    <div class="col-lg-6 col-12 my-auto">
                        <div class="content mb-4">
                            <h3><?php echo e(__($banner->data_values->heading)); ?></h3>
                            <p><?php echo e(__($banner->data_values->subheading)); ?></p>
                        </div>
                        <div class="d-flex">
                            <a href="<?php echo e($banner->data_values->button_one_link); ?>"
                                class="btn button me-3"><?php echo e(__($banner->data_values->button_one)); ?></a>
                            <a href="<?php echo e($banner->data_values->button_two_link); ?>"
                                class="btn btn2 button"><?php echo e(__($banner->data_values->button_two)); ?></a>
                        </div>
                    </div>
                    <div class="col-lg-6 col-12 my-auto pt-lg-0 pt-md-4 pt-4 thumb">
                        <div>
                            <img class="shape"
                                src="<?php echo e(getImage(getFilePath('bannerOne') . '/' . $banner->data_values->theme_one_shape)); ?>"
                                alt="shape" width="86">
                        </div>
                        <img src="<?php echo e(getImage(getFilePath('bannerOne') . '/' . $banner->data_values->theme_one_banner)); ?>"
                            class="img-fluid d-flex ms-auto" alt="image">
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!--========================== Banner Section End ==========================-->
<?php endif; ?>

<?php if($general->theme == 2): ?>
    <!--========================== Banner Section Start ==========================-->
    <section class="banner-section-two">
        <div class="banner-thumb bg-img bg-overlay py-120"
            data-background="<?php echo e(getImage(getFilePath('bannerOne') . '/' . $banner->data_values->theme_two_banner)); ?>">
            <div class="content mb-4 wow animate__animated animate__fadeInUp" data-wow-delay="0.6s">
                <h3><?php echo e(__($banner->data_values->heading)); ?></h3>
                <p><?php echo e(__($banner->data_values->subheading)); ?></p>
            </div>

            <div class="main">
                <form id="myForm" class="form-area d-flex" action="<?php echo e(route('search.by.type')); ?>" method="GET">
                   <div class="my-auto">
                    <div class="d-flex align-items-center">
                        <i class="fas fa-image"></i>
                      <p class="mx-2 text-nowrap"><?php echo app('translator')->get('Image'); ?></p>
                    </div>
                   </div>
                   <div class="w-100">
                    <div class="search">
                        <input id="searchInput" type="text" name="search" class="form--control"
                            value="<?php echo e(old('search')); ?>" placeholder="Search for photo">
                        <i class="fas fa-search"></i>
                    </div>
                   </div>
                </form>
            </div>
            <div class="tag">
                <?php $__currentLoopData = $tags; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <a href="<?php echo e(route('search.by.tag', $item->id)); ?>"><i
                            class="fas fa-search"></i></i><?php echo e($item->name); ?></a>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </div>
    </section>
    <!--========================== Banner Section End ==========================-->

    <!-- ==================== top categories Start ==================== -->
    <section class="top-categories pb-100">
        <div class="container">
            <div class="category-slider">
                <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div>
                        <a href="<?php echo e(route('files.category', $item->id)); ?>" class="card">
                            <div class="thumb">
                                <img src="<?php echo e(getImage(getFilePath('category') . '/' . $item->image)); ?>" alt="image">
                            </div>
                            <h5><?php echo e(__($item->name)); ?></h5>
                        </a>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </div>
    </section>
    <!-- ==================== top categories end ==================== -->
<?php endif; ?>

<?php $__env->startPush('script'); ?>
    <?php $__env->startPush('script'); ?>
        <script>
            $(document).ready(function() {
                'use strict';
                $('#searchInput').keypress(function(e) {
                    if (e.which === 13) {
                        e.preventDefault();
                        $('#myForm').submit();
                    }
                });
            });
        </script>
    <?php $__env->stopPush(); ?>
<?php $__env->stopPush(); ?>
<?php /**PATH C:\xampp\htdocs\photostack\application\resources\views/presets/default/sections/banner.blade.php ENDPATH**/ ?>