<header class="header-area style-1">
    <div class="header-logo">
        <a href="<?php echo e(url('/')); ?>">
            <?php if(get_setting('header_logo')): ?>
                <img src="<?php echo e(asset('assets/logo/' . get_setting('header_logo'))); ?>" alt="Logo">
            <?php else: ?>
                <img src="<?php echo e(asset('frontend/images/bg/header-logo.png')); ?>" alt="Logo">
            <?php endif; ?>
        </a>
    </div>
    <div class="topbar-right d-lg-none d-block" style="margin-left: 30px;">
        <ul class="topbar-right-list">
            <?php
                if (Session::has('locale')) {
                    $locale = Session::get('locale', Config::get('app.locale'));
                } else {
                    $locale = get_setting('DEFAULT_LANGUAGE', 'en');
                }
            ?>
            <li><span class="langName"><?php echo e($locale); ?></span><img
                    src="<?php echo e(asset('assets/img/flags/' . $locale . '.png')); ?>" alt="<?php echo e(translate('Language')); ?>">
                <ul class="topbar-sublist" id="change-lang">
                    <?php $__currentLoopData = \App\Models\Language::all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <li><a class="dropdown-item" href="javascript:void(0)" data-flag="<?php echo e($language->code); ?>"
                                class="dropdown-item <?php if($locale == $language->code): ?> active <?php endif; ?>"><span><?php echo e($language->name); ?></span><img
                                    src="<?php echo e(asset('assets/img/flags/' . $language->code . '.png')); ?>"
                                    alt="image"></a>
                        </li>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </ul>
            </li>
        </ul>
    </div>
    <div class="main-menu">
        <div class="mobile-logo-area d-lg-none d-flex justify-content-between align-items-center">
            <div class="mobile-logo-wrap ">
                <a href="<?php echo e(url('/')); ?>">
                    <?php if(get_setting('header_logo')): ?>
                        <img src="<?php echo e(asset('assets/logo/' . get_setting('header_logo'))); ?>" alt="Logo">
                    <?php else: ?>
                        <img src="<?php echo e(asset('frontend/images/bg/header-logo.png')); ?>" alt="Logo">
                    <?php endif; ?>
                </a>

            </div>
            <div class="menu-close-btn">
                <i class="bi bi-x-lg"></i>
            </div>
        </div>
        <?php
            $menu_items = \App\Models\MenuItem::with('page', 'category', 'blog')
                ->where('menu_id', 1)
                ->where('parent_id', null)
                ->orderBy('order', 'asc')
                ->get();

        ?>
        <?php if($menu_items->count() > 0): ?>
            <ul class="menu-list">
                <?php $__currentLoopData = $menu_items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $menu_item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php if($menu_item->children->count() > 0): ?>
                        <li class="menu-item-has-children">
                            <a target="<?php echo e($menu_item->menu_type == 'custom' ? ($menu_item->new_tap == 1 ? '__blank' : '') : ''); ?>"
                                href="<?php if($menu_item->menu_type == 'page'): ?> <?php echo e($menu_item->slug == 'home' ? url('/') : url($menu_item->slug)); ?><?php elseif($menu_item->menu_type == 'custom'): ?><?php echo e($menu_item->target); ?><?php elseif($menu_item->menu_type == 'category'): ?><?php echo e(url('/category/' . $menu_item->slug)); ?><?php else: ?><?php echo e(url('/blog/' . $menu_item->slug)); ?> <?php endif; ?>"
                                class="drop-down">

                                <?php if($menu_item->menu_type == 'page'): ?>
                                    <?php echo e($menu_item?->page?->getTranslation('page_name')); ?>

                                <?php elseif($menu_item->menu_type == 'category'): ?>
                                    <?php echo e($menu_item->category->getTranslation('name')); ?>

                                <?php elseif($menu_item->menu_type == 'blog'): ?>
                                    <?php echo e($menu_item?->blog?->getTranslation('title')); ?>

                                <?php else: ?>
                                    <?php echo e(Str::limit($menu_item->getTranslation('title'), 15)); ?>

                                <?php endif; ?>



                            </a>
                            <i class='bx bx-plus dropdown-icon'></i>

                            <ul class="submenu">
                                <?php $__currentLoopData = $menu_item->children; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $subMenu): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <?php if($subMenu->children->count() > 0): ?>
                                        <li class="menu-item-has-children">
                                            <a class="<?php if($menu_item->menu_type == 'page'): ?> <?php echo e(($menu_item->slug == 'home' ? (request()->is('/') ? 'active' : '') : request()->is($menu_item->slug)) ? 'active' : ''); ?>

                                            <?php elseif($menu_item->menu_type == 'category'): ?> <?php echo e(request()->segment(2) == $menu_item->slug ? 'active' : ''); ?>

                                            <?php elseif($menu_item->menu_type == 'blog'): ?> <?php echo e(request()->segment(2) == $menu_item->slug ? 'active' : ''); ?> <?php else: ?> <?php echo e(request()->is($menu_item->slug) ? 'active' : ''); ?> <?php endif; ?>
                                          "
                                                target="<?php echo e($menu_item->menu_type == 'custom' ? ($menu_item->new_tap == 1 ? '__blank' : '') : ''); ?>"
                                                href="<?php if($subMenu->menu_type == 'page'): ?> <?php echo e($subMenu->slug == 'home' ? url('/') : url($subMenu->slug)); ?><?php elseif($subMenu->menu_type == 'custom'): ?><?php echo e($subMenu->target); ?><?php elseif($subMenu->menu_type == 'category'): ?><?php echo e(url('/category/' . $subMenu->slug)); ?><?php else: ?><?php echo e(url('/blog/' . $subMenu->slug)); ?> <?php endif; ?>"
                                                class="drop-down">

                                                <?php if($subMenu->menu_type == 'page'): ?>
                                                    <?php echo e($subMenu?->page?->getTranslation('page_name')); ?>

                                                <?php elseif($subMenu->menu_type == 'category'): ?>
                                                    <?php echo e($subMenu->category->getTranslation('name')); ?>

                                                <?php elseif($subMenu->menu_type == 'blog'): ?>
                                                    <?php echo e($subMenu?->blog?->getTranslation('title')); ?>

                                                <?php else: ?>
                                                    <?php echo e(Str::limit($subMenu->getTranslation('title'), 15)); ?>

                                                <?php endif; ?>

                                            </a><i class='bx bx-plus dropdown-icon'></i>
                                            <ul class="submenu">
                                                <?php $__currentLoopData = $subMenu->children; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $subSubMenu): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <li><a class=" <?php if($menu_item->menu_type == 'page'): ?> <?php echo e(($menu_item->slug == 'home' ? (request()->is('/') ? 'active' : '') : request()->is($menu_item->slug)) ? 'active' : ''); ?>

                                                        <?php elseif($menu_item->menu_type == 'category'): ?> <?php echo e(request()->segment(2) == $menu_item->slug ? 'active' : ''); ?>

                                                        <?php elseif($menu_item->menu_type == 'blog'): ?> <?php echo e(request()->segment(2) == $menu_item->slug ? 'active' : ''); ?> <?php else: ?> <?php echo e(request()->is($menu_item->slug) ? 'active' : ''); ?> <?php endif; ?>
                                                      "
                                                            target="<?php echo e($menu_item->menu_type == 'custom' ? ($menu_item->new_tap == 1 ? '__blank' : '') : ''); ?>"
                                                            href="<?php if($subSubMenu->menu_type == 'page'): ?> <?php echo e($subSubMenu->slug == 'home' ? url('/') : url($subSubMenu->slug)); ?><?php elseif($subSubMenu->menu_type == 'custom'): ?><?php echo e($subSubMenu->target); ?><?php elseif($subSubMenu->menu_type == 'category'): ?><?php echo e(url('/category/' . $subSubMenu->slug)); ?><?php else: ?><?php echo e(url('/blog/' . $subSubMenu->slug)); ?> <?php endif; ?>">

                                                            <?php if($subSubMenu->menu_type == 'page'): ?>
                                                                <?php echo e($subSubMenu?->page?->getTranslation('page_name')); ?>

                                                            <?php elseif($subSubMenu->menu_type == 'category'): ?>
                                                                <?php echo e($subSubMenu->category->getTranslation('name')); ?>

                                                            <?php elseif($subSubMenu->menu_type == 'blog'): ?>
                                                                <?php echo e($subSubMenu?->blog?->getTranslation('title')); ?>

                                                            <?php else: ?>
                                                                <?php echo e(Str::limit($subSubMenu->getTranslation('title'), 15)); ?>

                                                            <?php endif; ?>

                                                        </a>
                                                    </li>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </ul>
                                        </li>
                                    <?php else: ?>
                                        <li><a class=" <?php if($menu_item->menu_type == 'page'): ?> <?php echo e(($menu_item->slug == 'home' ? (request()->is('/') ? 'active' : '') : request()->is($menu_item->slug)) ? 'active' : ''); ?> <?php elseif($menu_item->menu_type == 'category'): ?> <?php echo e(request()->segment(2) == $menu_item->slug ? 'active' : ''); ?><?php elseif($menu_item->menu_type == 'blog'): ?> <?php echo e(request()->segment(2) == $menu_item->slug ? 'active' : ''); ?> <?php else: ?> <?php echo e(request()->is($menu_item->slug) ? 'active' : ''); ?> <?php endif; ?>"
                                                href="
                                                <?php if($subMenu->menu_type == 'page'): ?> <?php echo e($subMenu->slug == 'home' ? url('/') : url($subMenu->slug)); ?>

                                                <?php elseif($subMenu->menu_type == 'custom'): ?>
                                                <?php echo e($subMenu->target); ?>

                                                <?php elseif($subMenu->menu_type == 'category'): ?>
                                                <?php echo e(url('/category/' . $subMenu->slug)); ?>

                                                <?php else: ?><?php echo e(url('/blog/' . $subMenu->slug)); ?> <?php endif; ?>"
                                                target="<?php echo e($menu_item->menu_type == 'custom' ? ($menu_item->new_tap == 1 ? '__blank' : '') : ''); ?>">

                                                <?php if($subMenu->menu_type == 'page'): ?>
                                                    <?php echo e($subMenu?->page?->getTranslation('page_name')); ?>

                                                <?php elseif($subMenu->menu_type == 'category'): ?>
                                                    <?php echo e($subMenu->category->getTranslation('name')); ?>

                                                <?php elseif($subMenu->menu_type == 'blog'): ?>
                                                    <?php echo e($subMenu?->blog?->getTranslation('title')); ?>

                                                <?php else: ?>
                                                    <?php echo e(Str::limit($subMenu->getTranslation('title'), 15)); ?>

                                                <?php endif; ?>

                                            </a>
                                        </li>
                                    <?php endif; ?>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </ul>
                        </li>
                    <?php else: ?>
                        <li>
                            <a class="<?php if($menu_item->menu_type == 'page'): ?> <?php echo e(($menu_item->slug == 'home' ? (request()->is('/') ? 'active' : '') : request()->is($menu_item->slug)) ? 'active' : ''); ?> <?php elseif($menu_item->menu_type == 'category'): ?> <?php echo e(request()->segment(2) == $menu_item->slug ? 'active' : ''); ?> <?php elseif($menu_item->menu_type == 'blog'): ?> <?php echo e(request()->segment(2) == $menu_item->slug ? 'active' : ''); ?> <?php else: ?> <?php echo e(request()->is($menu_item->slug) ? 'active' : ''); ?> <?php endif; ?>"
                                target="<?php echo e($menu_item->menu_type == 'custom' ? ($menu_item->new_tap == 1 ? '__blank' : '') : ''); ?>"
                                href="<?php if($menu_item->menu_type == 'page'): ?> <?php echo e($menu_item->slug == 'home' ? url('/') : url($menu_item->slug)); ?><?php elseif($menu_item->menu_type == 'custom'): ?><?php echo e($menu_item->target); ?><?php elseif($menu_item->menu_type == 'category'): ?><?php echo e(url('/category/' . $menu_item->slug)); ?><?php else: ?><?php echo e(url('/blog/' . $menu_item->slug)); ?> <?php endif; ?>">

                                <?php if($menu_item->menu_type == 'page'): ?>
                                    <?php echo e($menu_item?->page?->getTranslation('page_name')); ?>

                                <?php elseif($menu_item->menu_type == 'category'): ?>
                                    <?php echo e($menu_item->category->getTranslation('name')); ?>

                                <?php elseif($menu_item->menu_type == 'blog'): ?>
                                    <?php echo e($menu_item?->blog?->getTranslation('title')); ?>

                                <?php else: ?>
                                    <?php echo e(Str::limit($menu_item->getTranslation('title'), 15)); ?>

                                <?php endif; ?>

                            </a>
                        </li>
                    <?php endif; ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </ul>
        <?php endif; ?>
        <!-- mobile-search-area -->
        <div class="d-lg-none d-block">
            <div>
                <?php if(Auth::check() && Auth::user()->role == 1): ?>
                    <a class="eg-btn btn--primary header-btn2" href="<?php echo e(route('customer.dashboard')); ?>"><?php echo e(translate('My Account')); ?></a>
                <?php elseif(
                    (Auth::check() && Auth::user()->role == 2) ||
                        (Auth::check() && Auth::user()->role == 3) ||
                        (Auth::check() && Auth::user()->role == 4)): ?>
                    <a class="eg-btn btn--primary header-btn2" href="<?php echo e(route('backend.dashboard')); ?>"><?php echo e(translate('My Account')); ?></a>
                <?php else: ?>
                    <a class="eg-btn btn--primary header-btn2" href="<?php echo e(route('login')); ?>"><?php echo e(translate(get_setting('login_btn'))); ?></a>
                <?php endif; ?>
            </div>
            <ul class="authontication-btn-group">
                <?php if(Auth::guest()): ?>
                <li><a class="eg-btn btn--primary sign-up" href="<?php echo e(route('register')); ?>"><?php echo e(translate(get_setting('customer_btn'))); ?></a></li>
                <li><a class="eg-btn btn--primary marchant-btn" href="<?php echo e(route('merchant.register.show')); ?>"><?php echo e(translate(get_setting('marchant_btn'))); ?></a></li>
            <?php else: ?>
                <li><a class="logout" href="<?php echo e(route('logout')); ?>"
                        onclick="event.preventDefault();
                                                     document.getElementById('logout-form').submit();"><?php echo e(translate('Logout')); ?></a>
                </li>
                <form id="logout-form" action="<?php echo e(route('logout')); ?>" method="POST" class="d-none">
                    <?php echo csrf_field(); ?>
                </form>
            <?php endif; ?>
            </ul>
            <form class="mobile-menu-form mb-5" action="<?php echo e(route('main.search')); ?>" method="post">
                <?php echo csrf_field(); ?>
                <div class="input-with-btn d-flex">
                    <input type="text" name="search" placeholder="<?php echo e(translate('Search here')); ?>...">
                    <button type="submit" class="eg-btn btn--primary btn--sm"><i class="bi bi-search"></i></button>
                </div>
            </form>
            <?php if(get_setting('hotline_text') && get_setting('hotline_phone')): ?>
                <div class="hotline two">
                    <div class="hotline-info">
                        <span><?php echo e(get_setting('hotline_text')); ?></span>
                        <h6><a href="tel:<?php echo e(get_setting('hotline_phone')); ?>"><?php echo e(get_setting('hotline_phone')); ?></a>
                        </h6>
                    </div>
                </div>
            <?php endif; ?>
            <?php if(get_setting('email_address')): ?>
                <div class="email-area" style="text-align: center; margin-top: 30px;">
                    <h6><?php echo e(translate('Email')); ?>: <a
                            href="mailto:<?php echo e(get_setting('email_address')); ?>"><?php echo e(get_setting('email_address')); ?></a></h6>
                </div>
            <?php endif; ?>
            <div class="topbar-left d-flex flex-row align-items-center justify-content-center flex-wrap" style="margin-top: 15px;">
                <h6><?php echo e(translate('Join Us')); ?></h6>
                <ul class="topbar-social-list gap-1">
                    <?php if(get_setting('facebook_link')): ?>
                        <li><a href="<?php echo e(get_setting('facebook_link')); ?>"><i class='bx bxl-facebook'></i></a></li>
                    <?php endif; ?>
                    <?php if(get_setting('twitter_link')): ?>
                        <li><a href="<?php echo e(get_setting('twitter_link')); ?>"><i class='bx bxl-twitter'></i></a></li>
                    <?php endif; ?>
                    <?php if(get_setting('linkedin_link')): ?>
                        <li><a href="<?php echo e(get_setting('linkedin_link')); ?>"><i class='bx bxl-linkedin'></i></a></li>
                    <?php endif; ?>
                    <?php if(get_setting('youtube_link')): ?>
                        <li><a href="<?php echo e(get_setting('youtube_link')); ?>"><i class='bx bxl-youtube'></i></a></li>
                    <?php endif; ?>
                    <?php if(get_setting('instagram_link')): ?>
                        <li><a href="<?php echo e(get_setting('instagram_link')); ?>"><i class='bx bxl-instagram'></i></a></li>
                    <?php endif; ?>
                    <?php if(get_setting('pinterest_link')): ?>
                        <li><a href="<?php echo e(get_setting('pinterest_link')); ?>"><i class='bx bxl-pinterest-alt'></i></a></li>
                    <?php endif; ?>
                </ul>
            </div>
        </div>
    </div>
    <div class="nav-right d-flex align-items-center">
        <?php if(get_setting('hotline_text') && get_setting('hotline_phone')): ?>
            <div class="hotline d-xxl-flex d-none">
                <div class="hotline-icon">
                    <img alt="image" src="<?php echo e(asset('frontend/images/icons/header-phone.svg')); ?>">
                </div>
                <div class="hotline-info">
                    <span><?php echo e(get_setting('hotline_text')); ?></span>
                    <h6><a href="tel:<?php echo e(get_setting('hotline_phone')); ?>"><?php echo e(get_setting('hotline_phone')); ?></a></h6>
                </div>
            </div>
        <?php endif; ?>
        <div class="search-btn">
            <i class="bi bi-search"></i>
        </div>
        <div>
            <?php if(Auth::check() && Auth::user()->role == 1): ?>
                <a class="eg-btn btn--primary header-btn" href="<?php echo e(route('customer.dashboard')); ?>"><?php echo e(translate('My Account')); ?></a>
            <?php elseif(
                (Auth::check() && Auth::user()->role == 2) ||
                    (Auth::check() && Auth::user()->role == 3) ||
                    (Auth::check() && Auth::user()->role == 4)): ?>
                <a class="eg-btn btn--primary header-btn" href="<?php echo e(route('backend.dashboard')); ?>"><?php echo e(translate('My Account')); ?></a>
            <?php else: ?>
                <a class="eg-btn btn--primary header-btn" href="<?php echo e(route('login')); ?>"><?php echo e(translate(get_setting('login_btn'))); ?></a>
            <?php endif; ?>
        </div>
        <div class="mobile-menu-btn d-lg-none d-block">
            <i class='bx bx-menu'></i>
        </div>
    </div>
</header>
<?php /**PATH C:\ServBay\www\bidout-application\resources\views/frontend/template-1/partials/header.blade.php ENDPATH**/ ?>