<?php
    $pages = App\Models\Page::get();
    $query = App\Models\Category::where('status', 1)->latest();
?>

<!-- ==================== Header End Here ==================== -->
<?php if(Route::currentRouteName() != 'home' &&
        Route::currentRouteName() != 'file.details' &&
        Route::currentRouteName() != 'cookie.policy' &&
        Route::currentRouteName() != 'policy.pages' &&
        Route::currentRouteName() != 'contact'): ?>
<?php else: ?>
    <?php if($general->theme == 1): ?>
        <div class="header" id="header">
            <div class="container ">
                <nav class="navbar navbar-expand-lg">
                    <div class="header-menu-wrapper align-items-center d-flex">
                        <div class="logo-wrapper">
                            <a href="<?php echo e(route('home')); ?>" class="navbar-brand logo" id="normal-logo">
                                <img src="<?php echo e(getImage('assets/images/general/logo1.png')); ?>" alt="...">
                            </a>
                        </div>
                    </div>
                    <form id="myForm" class="form-area d-flex" action="<?php echo e(route('search.by.type')); ?>" method="GET">
                        <div class="d-flex align-items-center">
                            <i class="fas fa-image ps-2"></i>
                            <p class="mx-2"><?php echo app('translator')->get('Image'); ?></p>
                        </div>
                        <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>
                    </form>
                    <button class="navbar-toggler header-button" type="button" data-bs-toggle="collapse"
                        data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
                        aria-expanded="false" aria-label="Toggle navigation">
                        <span id="hiddenNav"><i class="las la-bars"></i></span>
                    </button>

                    <div class="collapse navbar-collapse" id="navbarSupportedContent">
                        <ul class="navbar-nav nav-menu me-auto ps-lg-4 ps-0">
                            <?php $__currentLoopData = $pages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $page): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php if($page->slug == 'explore'): ?>
                                    <li class="nav-item">
                                        <a class="nav-link <?php echo e(Request::url() == url('/') . '/' . $page->slug ? 'active' : ''); ?>"
                                            href="<?php echo e(route('pages', $page->slug)); ?>"><?php echo e(__($page->name)); ?></a>
                                    </li>
                                <?php endif; ?>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <?php if(auth()->guard()->guest()): ?>
                                <?php
                                    $categories = $query->take(3)->get();
                                ?>
                                <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <li class="nav-item">
                                        <a class="nav-link  <?php echo e(Request::url() == route('files.category', $item->id)); ?> ? 'active' : '' }}"
                                            href="<?php echo e(route('files.category', $item->id)); ?>"><?php echo e(__($item->name)); ?></a>
                                    </li>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <?php endif; ?>
                            <?php if(auth()->guard()->check()): ?>
                                <?php
                                    $categories = $query->take(2)->get();
                                ?>
                                <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <li class="nav-item">
                                        <a class="nav-link  <?php echo e(Request::url() == route('files.category', $item->id)); ?> ? 'active' : '' }}"
                                            href="<?php echo e(route('files.category', $item->id)); ?>"><?php echo e(__($item->name)); ?></a>
                                    </li>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <?php endif; ?>
                        </ul>
                        <div class="d-flex lan">
                            <i class="fas fa-globe"></i>
                            <select class="form-select langSel">
                                <?php $__currentLoopData = $language; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($item->code); ?>"
                                        <?php if(session('lang') == $item->code): ?> selected <?php endif; ?>>
                                        <?php echo e(__($item->name)); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                        <div class="login">
                            <?php if(auth()->guard()->guest()): ?>
                                <a class="my-auto" href="<?php echo e(route('user.login')); ?>"><i
                                        class="fa-solid fa-user-large"></i><?php echo app('translator')->get('Sign In'); ?></a>
                            <?php endif; ?>

                            <?php if(auth()->guard()->check()): ?>
                                <a class="nav-link" href="<?php echo e(route('user.home')); ?>"><?php echo app('translator')->get('Dashboard'); ?></a>
                            <?php endif; ?>
                        </div>
                    </div>
                </nav>
            </div>
        </div>
    <?php endif; ?>
<?php endif; ?>

<?php if(Route::currentRouteName() != 'home'): ?>
<?php else: ?>
    <?php if($general->theme == 2): ?>
        <div class="header-two" id="header">
            <div class="container">
                <nav class="navbar navbar-expand-lg">
                    <a class="navbar-brand logo" href="<?php echo e(route('home')); ?>"><img
                            src="<?php echo e(getImage('assets/images/general/logo2.png')); ?>" alt=""></a>
                    <button class="navbar-toggler header-button" type="button" data-bs-toggle="collapse"
                        data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
                        aria-expanded="false" aria-label="Toggle navigation">
                        <span id="hiddenNav"><i class="las la-bars"></i></span>
                    </button>

                    <div class="collapse navbar-collapse" id="navbarSupportedContent">
                        <ul class="navbar-nav nav-menu me-auto ps-lg-4 ps-0">
                            <?php $__currentLoopData = $pages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $page): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php if($page->slug == 'explore'): ?>
                                    <li class="nav-item">
                                        <a class="nav-link <?php echo e(Request::url() == url('/') . '/' . $page->slug ? 'active' : ''); ?>"
                                            href="<?php echo e(route('pages', $page->slug)); ?>"><?php echo e(__($page->name)); ?></a>
                                    </li>
                                <?php endif; ?>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <?php if(auth()->guard()->guest()): ?>
                                <?php
                                    $categories = $query->take(3)->get();
                                ?>
                                <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <li class="nav-item">
                                        <a class="nav-link  <?php echo e(Request::url() == route('files.category', $item->id)); ?> ? 'active' : '' }}"
                                            href="<?php echo e(route('files.category', $item->id)); ?>"><?php echo e(__($item->name)); ?></a>
                                    </li>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <?php endif; ?>
                            <?php if(auth()->guard()->check()): ?>
                                <?php
                                    $categories = $query->take(2)->get();
                                ?>
                                <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <li class="nav-item">
                                        <a class="nav-link  <?php echo e(Request::url() == route('files.category', $item->id)); ?> ? 'active' : '' }}"
                                            href="<?php echo e(route('files.category', $item->id)); ?>"><?php echo e(__($item->name)); ?></a>
                                    </li>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <?php endif; ?>
                        </ul>
                        <div class="d-flex lan">
                            <i class="fas fa-globe"></i>
                            <select class="form-select langSel">
                                <?php $__currentLoopData = $language; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($item->code); ?>"
                                        <?php if(session('lang') == $item->code): ?> selected <?php endif; ?>>
                                        <?php echo e(__($item->name)); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                        <div class="login">
                            <?php if(auth()->guard()->guest()): ?>
                                <a class="my-auto" href="<?php echo e(route('user.login')); ?>"><i
                                        class="fa-solid fa-user-large"></i><?php echo app('translator')->get('Sign In'); ?></a>
                            <?php endif; ?>

                            <?php if(auth()->guard()->check()): ?>
                                <li class="nav-item">
                                    <a class="nav-link" href="<?php echo e(route('user.home')); ?>"><?php echo app('translator')->get('Dashboard'); ?></a>
                                </li>
                            <?php endif; ?>
                        </div>
                    </div>
                </nav>
            </div>
        </div>
    <?php endif; ?>
<?php endif; ?>
<!-- ==================== Header End Here ==================== -->

<?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 /**PATH C:\xampp\htdocs\photostack\application\resources\views/presets/default/partials/header.blade.php ENDPATH**/ ?>