<header class="navbar navbar-expand-md navbar-dark navbar-overlap d-print-none">
    <div class="container-xl">
        <button class="navbar-toggler collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-menu" aria-expanded="false">
            <span class="navbar-toggler-icon"></span>
        </button>
        <a href="<?php echo e(url('/')); ?>" class="navbar-brand navbar-brand-autodark d-none-navbar-horizontal pe-0 pe-md-3">
            <?php if(!empty(App\Models\Settings::find('logo_image')->value)): ?>
            <img src="<?php echo e(asset('storage/app/public/images/logo/'.App\Models\Settings::find('logo_image')->value)); ?>" title="<?php echo e($site_name); ?>" height="32px">
            <?php else: ?>
            <?php echo e($site_name); ?>

            <?php endif; ?>
        </a>
          
        <div class="navbar-nav flex-row order-md-last">
            <?php if(Auth::check()): ?>
            <!-- Notifications -->
            <div class="nav-item dropdown d-md-flex me-3">
                <a href="javascript:void(0);" onclick="markAsRead()" class="nav-link px-0" data-bs-toggle="modal" data-bs-target="#notifications">
                    <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 5a2 2 0 0 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6" /><path d="M9 17v1a3 3 0 0 0 6 0v-1" /></svg>
                    <?php if(Auth::user()->notification_count() >= 1): ?>
                    <span class="badge badge-pill bg-red" id="notify">
                        <?php echo e(Auth::user()->notification_count()); ?>

                    </span>
                    <?php endif; ?>
                </a>
            </div>
            <!-- end Notifications -->
            
            <div class="nav-item dropdown">
                <a href="#" class="nav-link d-flex lh-1 text-reset p-0" data-bs-toggle="dropdown" aria-label="Open user menu" aria-expanded="false">
                    <?php if(!empty(Auth::user()->avatar)): ?>
                    <span class="avatar avatar-sm" style="background-image: url(<?php echo e(asset('storage/app/public/images/avatar/'.Auth::user()->avatar)); ?>)"></span>
                    <?php else: ?>
                    <span class="avatar avatar-sm">
                        <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><circle cx="12" cy="7" r="4" /><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2" /></svg>
                    </span>
                    <?php endif; ?>
                    <div class="d-none d-xl-block ps-2">
                        <div><?php echo e(Str::limit(Auth::user()->name, 12)); ?></div>
                        <div class="mt-1 small text-muted"><?php echo e(Str::limit(Auth::user()->email, 12)); ?></div>
                    </div>
                </a>
              
                <div class="dropdown-menu dropdown-menu-end dropdown-menu-arrow">
                    <a href="<?php echo e(url('profile/@'.Auth::user()->name)); ?>" class="dropdown-item"><?php echo e(__('main.nav_profile')); ?></a>
                    <a href="<?php echo e(url('favorites')); ?>" class="dropdown-item"><?php echo e(__('main.nav_saved')); ?></a>
                    <div class="dropdown-divider"></div>
                    <a href="<?php echo e(url('settings/edit')); ?>" class="dropdown-item"><?php echo e(__('main.nav_account')); ?></a>
                    <?php if(auth()->check() && auth()->user()->hasRole('moderator')): ?>
                    <a href="<?php echo e(url('admin/posts')); ?>" class="dropdown-item">
                        <?php echo e(__('main.nav_post_moderation')); ?>

                    </a>
                    <?php endif; ?>
                    <?php if(auth()->check() && auth()->user()->hasRole('admin')): ?>
                    <a href="<?php echo e(url('admin')); ?>" class="dropdown-item">
                        <?php echo e(__('main.nav_administration')); ?>

                    </a>
                    <?php endif; ?>
                    <a href="<?php echo e(route('logout')); ?>" class="dropdown-item" 
                       onclick="event.preventDefault();
                                document.getElementById('logout-form').submit();"><?php echo e(__('main.nav_logout')); ?></a>
                    <form id="logout-form" action="<?php echo e(route('logout')); ?>" method="POST">
                        <?php echo csrf_field(); ?>
                    </form>
                </div>
            </div>
            <?php else: ?>
            <li class="nav-item">
                <a class="nav-link" href="<?php echo e(url('login')); ?>">
                    <span class="nav-link-icon d-lg-inline-block"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2" /><path d="M20 12h-13l3 -3m0 6l-3 -3" /></svg>
                    </span>
                    <span class="nav-link-title d-none d-sm-block">
                        <?php echo e(__('main.nav_login')); ?>

                    </span>
                </a>
            </li>
            <?php endif; ?>  
        </div>
          
        <div class="navbar-collapse collapse" id="navbar-menu" style="">
            <div class="d-flex flex-column flex-md-row flex-fill align-items-stretch align-items-md-center">
                <ul class="navbar-nav">
                    
                    <li class="nav-item dropdown">
                        <a class="nav-link strong dropdown-toggle" href="#navbar-base" data-bs-toggle="dropdown" role="button" aria-expanded="false">
                            <span class="nav-link-icon d-md-none d-lg-inline-block"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><circle cx="12" cy="12" r="9" /><line x1="3.6" y1="9" x2="20.4" y2="9" /><line x1="3.6" y1="15" x2="20.4" y2="15" /><path d="M11.5 3a17 17 0 0 0 0 18" /><path d="M12.5 3a17 17 0 0 1 0 18" /></svg>
                            </span>
                            <span class="nav-link-title">
                                <?php echo e(__('main.nav_explore')); ?>

                            </span>
                        </a>
                  
                        <div class="dropdown-menu">
                            <div class="dropdown-menu-columns">
                                <div class="dropdown-menu-column">

                                    <a class="dropdown-item text-reset strong" href="#" data-bs-toggle="modal" data-bs-target="#modal--write--story">
                                        <svg xmlns="http://www.w3.org/2000/svg" class="icon dropdown-item-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><circle cx="12" cy="12" r="9" /><line x1="9" y1="12" x2="15" y2="12" /><line x1="12" y1="9" x2="12" y2="15" /></svg> 
                                        <?php echo e(__('main.nav_submit_a_story')); ?>

                                    </a>

                                    <div class="dropdown-divider"></div>
                                    
                                    <!-- Categories -->
                                    <div class="dropend">
                                        <a class="dropdown-item dropdown-toggle" href="#sidebar-authentication" data-bs-toggle="dropdown" role="button" aria-expanded="false">
                                            <?php echo e(__('main.nav_categories')); ?>

                                        </a>
                                        <div class="dropdown-menu">
                                            <?php $__empty_1 = true; $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                            <a class="dropdown-item" href="<?php echo e(url('category/'.$category->slug)); ?>">
                                                <?php echo e($category->name); ?>

                                            </a>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                            <span class="dropdown-item">
                                                <?php echo e(__('main.there_are_no_categories')); ?>

                                            </span>
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                    <!-- end Categories -->
                                    
                                    <!-- Pages -->
                                    <div class="dropend">
                                        <a class="dropdown-item dropdown-toggle" href="#sidebar-authentication" data-bs-toggle="dropdown" role="button" aria-expanded="false">
                                            <?php echo e(__('main.nav_pages')); ?>

                                        </a>
                                        <div class="dropdown-menu">
                                            <?php $__empty_1 = true; $__currentLoopData = $pages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $page): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                            <a href="<?php echo e(url('page/'.$page->slug)); ?>" class="dropdown-item text-truncate">
                                                <?php echo e($page->title); ?>

                                            </a>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                            <span class="dropdown-item">
                                                <?php echo e(__('main.there_are_no_pages')); ?>

                                            </span>
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                    <!-- end Pages -->
                                    
                                </div>
                            </div>
                        </div>
                    </li>
                </ul>
              
                <div class="ms-md-auto ps-md-2 py-2 py-md-0 me-md-2 order-first order-md-last flex-grow-1">
                    <form action="<?php echo e(route('search')); ?>" method="get">
                        <?php echo csrf_field(); ?>
                        <div class="input-icon">
                            <span class="input-icon-addon">
                                <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><circle cx="10" cy="10" r="7"></circle><line x1="21" y1="21" x2="15" y2="15"></line></svg>
                            </span>
                            <input type="text" class="form-control form-control-rounded form-control-dark <?php $__errorArgs = ['key'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="key" value="<?php echo e(old('key')); ?>" type="search" placeholder="<?php echo e(__('main.nav_search')); ?>" aria-label="Search in website">
                            
                            <?php $__errorArgs = ['key'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="invalid-feedback" role="alert">
                                <strong><?php echo e($message); ?></strong>
                            </span>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</header>

<div class="navbar-expand-md sticky-top shadow">
    <div class="collapse navbar-collapse" id="navbar-menu">
        <div class="navbar navbar-dark">
            <div class="container-xl">
                <ul class="navbar-nav">
                    <li class="nav-item <?php echo e((request()->is('/')) ? 'active': ''); ?>">
                        <a class="nav-link strong" href="<?php echo e(url('/')); ?>">
                            <span class="nav-link-icon d-lg-inline-block">
                                <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><line x1="4" y1="6" x2="13" y2="6" /><line x1="4" y1="12" x2="11" y2="12" /><line x1="4" y1="18" x2="11" y2="18" /><polyline points="15 15 18 18 21 15" /><line x1="18" y1="6" x2="18" y2="18" /></svg>
                            </span>
                            <span class="nav-link-title">
                                <?php echo e(__('main.nav_latests')); ?>

                            </span>
                        </a>
                    </li>
                    
                    <li class="nav-item <?php echo e((request()->is('viral')) ? 'active': ''); ?>">
                        <a class="nav-link strong" href="<?php echo e(url('viral')); ?>">
                            <span class="nav-link-icon d-lg-inline-block">
                                <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><line x1="3" y1="12" x2="6" y2="12" /><line x1="12" y1="3" x2="12" y2="6" /><line x1="7.8" y1="7.8" x2="5.6" y2="5.6" /><line x1="16.2" y1="7.8" x2="18.4" y2="5.6" /><line x1="7.8" y1="16.2" x2="5.6" y2="18.4" /><path d="M12 12l9 3l-4 2l-2 4l-3 -9" /></svg>
                            </span>
                            <span class="nav-link-title">
                                <?php echo e(__('main.nav_viral')); ?>

                            </span>
                        </a>
                    </li>
                    
                    <li class="nav-item <?php echo e((request()->is('random')) ? 'active': ''); ?>">
                        <a class="nav-link strong" href="<?php echo e(url('random')); ?>">
                            <span class="nav-link-icon d-lg-inline-block">
                                <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 17h5l1.67 -2.386m3.66 -5.227l1.67 -2.387h6" /><path d="M18 4l3 3l-3 3" /><path d="M3 7h5l7 10h6" /><path d="M18 20l3 -3l-3 -3" /></svg>
                            </span>
                            <span class="nav-link-title">
                                <?php echo e(__('main.nav_random')); ?>

                            </span>
                        </a>
                    </li>
                    
                </ul>
                  
                <div class="my-2 my-md-0 flex-grow-1 flex-md-grow-0 order-first order-md-last">
                    <a href="#" class="btn btn-secondary btn-pill strong" data-bs-toggle="modal" data-bs-target="#modal--write--story">
                        <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><circle cx="12" cy="12" r="9" /><line x1="9" y1="12" x2="15" y2="12" /><line x1="12" y1="9" x2="12" y2="15" /></svg> <?php echo e(__('main.btn_submit_a_story')); ?>

                    </a>
                </div>
                
            </div>
        </div>
    </div>
</div>

<?php if(Auth::check()): ?>
<!-- show notifications only if user is logged in -->
<?php echo $__env->make('layouts.notifications', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php endif; ?>

<!-- form in modal write a story -->
<?php echo $__env->make('layouts.modal.form_write_story', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\Marco\Desktop\xampp\htdocs\anonymous\resources\views\layouts\navigation.blade.php ENDPATH**/ ?>