@php
    use Carbon\Carbon;
@endphp
<header class="main-header">
    <!-- Logo -->
    <a href="/" class="logo">
      <!-- mini logo for sidebar mini 50x50 pixels -->
      <span class="logo-mini">GV</span>
      <!-- logo for regular state and mobile devices -->
      <span class="logo-lg"><b>Gestion Veterinaria</b></span>
    </a>
    <!-- Header Navbar: style can be found in header.less -->
    <nav class="navbar navbar-static-top">
      <!-- Sidebar toggle button-->
     <!-- Esconde menu -----------------------------------------------------------------------
      <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
        <span class="sr-only">Toggle navigation</span>
      </a>
    ----------------------------------------------------------------------------------------->

    <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
        <span class="sr-only">Toggle navigation</span>
      </a>

      <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">     
          <!-- User Account: style can be found in dropdown.less -->
          <li class="dropdown user user-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
            <i class="fa fa-paw"></i>
            

              <span class="hidden-xs">{{session()->get('nombre_usuario', 'Invitado')}} - {{session()->get('rol_nombre', 'Guest')}}</span><!--nombre superior derecho -->
            </a>
            <ul class="dropdown-menu">
              <!-- User image -->
              <li class="user-header">
                <p>
                  {{session()->get('nombre_usuario', 'Inivitado')}} - {{session()->get('rol_nombre', 'Guest')}} <!-- nombre de la barra de usuario -->
                    @auth
                        <small>Registrado desde {{Carbon::parse(auth()->user()->created_at)->year }}</small>
                    @endauth
                    </p>
              </li>
              <!-- Menu Body -->
              
              <li class="user-body">
                <div class="row">
                    @if(session()->get("roles") && count(session()->get("roles")) > 1)
                        <div class="col-xs-6 text-center">
                            <a href="#" class="cambiar-rol">Cambiar Rol</a>
                        </div>
                    @endif
                </div>
              </li>
              <!-- Menu Footer-->
              <li class="user-footer">
                <div class="pull-left">
                    @guest
                        <a href="{{route('login')}}" class="btn btn-default btn-flat">Login</a>
                    @endguest
                </div>
                <div class="pull-right">
                  <a href="{{route('logout')}}" class="btn btn-default btn-flat">Salir</a>
                </div>
              </li>
            </ul>
          </li>
          <!-- Control Sidebar Toggle Button -->
        </ul>
      </div>
    </nav>
  </header>
