<header>
    <div class="nav_container">
        <!--Menu-->
        <section class="top_navbar">
            <div class="container">
                <div class="content">
                    <div class="row">
                        <div class="col-lg-6">
                            <div class="socail_icons">
                                @if(($settings['youtube'] ?? ''))
                                    <a target="_blank" href="{{($settings['youtube'] ?? '#')}}">
                                        <i class="bi bi-youtube"></i>
                                    </a>
                                @endif
                                @if(($settings['linkedin'] ?? ''))
                                    <a target="_blank" href="{{($settings['linkedin'] ?? '#')}}">
                                        <i class="bi bi-linkedin"></i>
                                    </a>
                                @endif
                                @if(($settings['snapchat'] ?? ''))
                                    <a target="_blank" href="{{($settings['snapchat'] ?? '#')}}">
                                        <i class="bi bi-snapchat"></i>
                                    </a>
                                @endif
                                @if(($settings['twitter'] ?? ''))
                                    <a target="_blank" href="{{($settings['twitter'] ?? '#')}}">
                                        <i class="bi bi-twitter"></i>
                                    </a>
                                @endif
                                @if(($settings['instagram'] ?? ''))
                                    <a target="_blank" href="{{($settings['instagram'] ?? '#')}}">
                                        <i class="bi bi-instagram"></i>
                                    </a>
                                @endif
                                @if(($settings['tiktok'] ?? ''))
                                    <a target="_blank" href="{{($settings['tiktok'] ?? '#')}}">
                                        <i class="bi bi-tiktok"></i>
                                    </a>
                                @endif
                                @if(($settings['facebook'] ?? ''))
                                    <a target="_blank" href="{{($settings['facebook'] ?? '#')}}">
                                        <i class="bi bi-facebook"></i>
                                    </a>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="top_links text-end">
                                <a href="tel::{{($settings['site_phone'] ?? '+966-744522331')}}">
                                    <i class="bi bi-phone"></i>
                                    <span>{{($settings['site_phone'] ?? '+966-744522331')}}</span>
                                </a>
                                <a href="#">
                                    <i class="bi bi-geo-alt"></i>
                                    <span>{{($settings['site_address'] ?? '')}}</span>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <nav class="navbar navbar-expand-lg navbar-dark">
            <div class="container align-items-start">
                <a class="navbar-brand" href="{{LaravelLocalization::getLocalizedURL($lang, route('home'), [], true)}}">
                    <img src="{{asset('assets/web/images/logo.svg')}}" alt="">
                </a>
                <button class="navbar-toggler" type="button" data-bs-toggle="collapse"
                        data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
                        aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>
                <div class="collapse navbar-collapse mt-4" id="navbarSupportedContent">
                    <ul class="navbar-nav m-auto">
                        <li class="nav-item">
                            <a class="nav-link {{isActive(route('home'))}}" aria-current="page" href="{{LaravelLocalization::getLocalizedURL($lang, route('home'), [], true)}}">{{__('main.home')}} </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="{{LaravelLocalization::getLocalizedURL($lang, route('aboutUs'), [], true)}}">{{__('abouts.head')}}</a>
                        </li>
                        <li class="nav-item dropdown">
                            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
                               data-bs-toggle="dropdown" aria-expanded="false">
                                {{__('main.services')}}
                            </a>
                            <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
                                <li><a class="dropdown-item" href="{{LaravelLocalization::getLocalizedURL($lang, route('consulting.index'), [], true)}}">{{__('main.consultation')}}</a></li>
                                <li><a class="dropdown-item" href="{{LaravelLocalization::getLocalizedURL($lang, route('cases.index'), [], true)}}">{{__('main.issues')}}</a></li>
                                <li><a class="dropdown-item" href="{{LaravelLocalization::getLocalizedURL($lang, route('documentation.index'), [], true)}}">{{__('main.documentation')}}</a></li>
                                <li><a class="dropdown-item" href="{{LaravelLocalization::getLocalizedURL($lang, route('trainings.index'), [], true)}}">{{__('main.training')}}</a></li>
                            </ul>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="{{route('home')}}#numbers">{{__('main.mattered_numbers')}}</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="#partners">{{__('partners.head')}}</a>
                        </li>
                        <li class="nav-item">
                                <a class="nav-link {{isActive(route('news.index'))}}" href="{{LaravelLocalization::getLocalizedURL($lang, route('news.index'), [], true)}}">{{__('articles.head')}}</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link {{isActive(route('contactUs'))}}" href="{{LaravelLocalization::getLocalizedURL($lang, route('contactUs'), [], true)}}">{{__('visitorMessages.head')}}</a>
                        </li>
                    </ul>
                    <div class="d-flex">
                        <div class="dropdown">
                            <button class="butn bg-white me-3 dropdown-toggle" type="button"
                                    id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
                                <span class="text-dark me-1"> <i class="bi bi-person"></i>
                                 @if(auth()->check() && auth()->user()->role == 'user')
                                        {{wordLimit(auth()->user()->name, 1, '')}}
                                    @else
                                        {{__('members.login_register')}}
                                    @endif
                                </span>
                            </button>
                            <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
                                @if(auth()->check() && auth()->user()->role == 'user')
                                    <li><a class="dropdown-item" href="{{LaravelLocalization::getLocalizedURL($lang, route('user.profile'), [], true)}}">{{__('members.my_profile')}}</a></li>
                                    <li><a class="dropdown-item" href="{{LaravelLocalization::getLocalizedURL($lang, route('user.myConsulting'), [], true)}}">{{__('members.my_consulting')}}</a></li>
                                    <li><a class="dropdown-item" href="{{LaravelLocalization::getLocalizedURL($lang, route('user.myDocumentations'), [], true)}}">{{__('members.my_documentations')}}</a></li>
                                    <li><a class="dropdown-item" href="{{LaravelLocalization::getLocalizedURL($lang, route('user.notifications'), [], true)}}">{{__('members.notifications')}} {!! notifications() ? '<i class="fa fa-bell text-danger"></i> <span class="text-danger notification_counter">'. notifications() .' </span>' : '' !!}</a></li>
                                    <li><a class="dropdown-item" href="{{LaravelLocalization::getLocalizedURL($lang, route('user.logout'), [], true)}}">{{__('members.logout')}}</a></li>
                                @else
                                    <li><a class="dropdown-item" href="{{LaravelLocalization::getLocalizedURL($lang, route('user.login'), [], true)}}">{{__('members.login')}}</a></li>
                                    <li><a class="dropdown-item" href="{{LaravelLocalization::getLocalizedURL($lang, route('user.register'), [], true)}}">{{__('members.register')}}</a></li>
                                @endif
                            </ul>
                        </div>
                        @if($lang == 'ar')
                            <a href="{{LaravelLocalization::getLocalizedURL('en', null, [], true)}}" class="butn sub_butn">
                                <span> <i class="bi bi-globe me-1"></i> {{__('main.another_lang_short')}}</span>
                            </a>
                            @else
                            <a href="{{LaravelLocalization::getLocalizedURL('ar', null, [], true)}}" class="butn sub_butn">
                                <span> <i class="bi bi-globe me-1"></i> {{__('main.another_lang_short')}}</span>
                            </a>
                        @endif

                    </div>
                </div>
            </div>
        </nav>
    </div>
    <!--End-Menu-->
    <div class="container">
        <div class="head_slider">
            <div class="swiper-container">
                <div class="swiper-wrapper">
                    @if(count($sliders))
                        @foreach($sliders as $slider)
                            <div class="swiper-slide">
                                <div class="content">
                                    <div class="row">
                                        <div class="col-lg-7">
                                            <div class="info">
                                                <h6>{{$slider->first_title}}</h6>
                                                <h2>{{$slider->second_title}}</h2>
                                                <div class="text">{!! stripText($slider->description) !!}</div>
                                                @if($slider->button_url)
                                                    <a target="_blank" href="{{$slider->button_url}}" class="butn sub_butn">
                                                        <span>{{$slider->button_title}}</span>
                                                    </a>
                                                @endif

                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        @endforeach
                    @endif

                </div>
                <!-- -----------  -->
                <div class="swiper-pagination"></div>
                <!-- -----------  -->
                <div class="swiper_nav">
                    <div class="swiper_next">
                        <i class="bi bi-arrow-right"></i>
                    </div>
                    <div class="swiper_prev">
                        <i class="bi bi-arrow-left"></i>
                    </div>
                </div>
            </div>
        </div>
    </div>
</header>
