<div class="navbar-container">
    <div class="bg-white navbar-light" data-sticky="top">
        <div class="container">
            <nav class="navbar navbar-expand-lg">
                <a class="navbar-brand" href="{{route('portal.plocha')}}">
                    <img class="logo" style="height: 1.7rem !important;" src="{{asset('assets/images/page-logo.png')}}"
                         alt="">
                </a>
                <button class="navbar-toggler" type="button" data-toggle="collapse"
                        data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
                        aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
                    <span class="navbar-toggler-icon text-dark"></span>
                </button>

                {{--                <div class="collapse navbar-collapse justify-content-between" id="navbarSupportedContent">--}}
                {{--                    {!! Menu::get('main', 'navbar'); !!}--}}
                {{--                </div>--}}

                <div class="collapse navbar-collapse justify-content-between" id="navbarSupportedContent">
                    <ul class="navbar-nav mr-auto">
                        @auth
                            @includeIf('Vzdelavanie::partials.navbar')

                            <li class="nav-item dropdown">
                                <a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown"
                                   aria-haspopup="true" aria-expanded="false">
                                    <i class="icon-target"></i>
                                    Služby <span class="caret"></span>
                                </a>

                                <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
                                    @includeIf('Objednavky::partials.navbar')
                                    @includeIf('Terminy::partials.navbar')
                                    @includeIf('Statistiky::partials.navbar')
                                    {{--                                @includeIf('BazaZnalosti::partials.navbar')--}}
                                    @includeIf('IAisek::partials.navbar')
                                </div>
                            </li>

                            <li class="nav-item">
                                <a class="nav-link {{ str_contains(Route::currentRouteName(), 'portal.informacie.index') ? 'active' : '' }}"
                                   href="{{ route('portal.informacie.index') }}">
                                    <i class="icon-info-circled"></i>
                                    Informácie
                                </a>
                            </li>

                            @can('portal_sprava')
                                <li class="nav-item">
                                    <a class="nav-link {{ str_contains(Route::currentRouteName(), 'portal.sprava') ? 'active' : '' }}"
                                       href="{{ route('portal.sprava.index') }}">
                                        <i class="icon-cog"></i>
                                        Správa
                                    </a>
                                </li>
                            @endcan
                        @endauth
                    </ul>

                    <ul class="navbar-nav ml-auto">
                        @guest
                            <li class="nav-item">
                                <a class="nav-link" href="{{route('login.form')}}">Prihlásenie</a>
                            </li>
                        @else
                            <li class="nav-item dropdown">
                                <a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button"
                                   data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                    @livewire('components.notifications.indicator', compact('userNotifications'))
                                    <i class="icon-user"></i>
                                    {{Auth::user()->cele_meno}}
                                    <span class="caret"></span>
                                </a>

                                <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
                                    <a href="{{ route('portal.pouzivatel.notifikacie.index') }}" class="dropdown-item">
                                        <i class="icon-bell"></i>
                                        Notifikácie @livewire('components.notifications.counter', compact('userNotifications'))
                                    </a>
                                    <hr class="m-0 my-1 p-0">
                                    <a class="dropdown-item" href="{{route('logout')}}"
                                       onclick="event.preventDefault();document.getElementById('logout-form').submit();">
                                        <i class="icon-logout"></i>
                                        Odhlásiť sa
                                    </a>

                                    <form id="logout-form" action="{{route('logout')}}" method="POST"
                                          style="display: none;">
                                        @csrf
                                    </form>
                                </div>
                            </li>
                        @endguest
                    </ul>
                </div>
            </nav>
        </div>
    </div>
</div>