@php

$dmdhide = isset($noscript)?'':'d-md-none';
$li = $dropdown ? '' : "<li class=\"nav-item ml-1 $dmdhide\" aria-hidden=\"true\">";
$aclass = $dropdown ? 'dropdown-item' : 'nav-link';

@endphp

{!! $li !!}
<a class="{{ $aclass }}" href="{{ route('home') }}">
  <i class="fa-home fa-pr"></i>{{ __('Your Profile') }}
</a>

{!! $li !!}
  <a class="{{ $aclass }}" href="{{ route('account.edit') }}">
    <i class="fa-key-modern fa-pr"></i>{{ __('Settings') }}
  </a>

{!! $li !!}
  <form method="POST" action="{{ route('toggle-dark-mode') }}" aria-hidden="true">
    @csrf
    <button id="toggle-dark-mode-btn" class="btn-link border-0 {{ $aclass }}" type="submit" onclick="event.preventDefault(); toggleDarkMode();">
        <span class="dark-mode-switch-on">
            <i class="fa-sun-o fa-pr"></i>{{ __('Light Mode') }}
        </span>
        <span class="dark-mode-switch-off">
            <i class="fa-moon-o fa-pr"></i>{{ __('Dark Mode') }}
        </span>
    </button>
  </form>

{!! $li !!}
<a class="{{ $aclass }}" href="{{ route('logout') }}"
   onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
  {{-- this is some hack against CSRF - logout only via POST --}}
  <i class="fa-sign-out fa-pr"></i>{{ __('Logout') }}
</a>