<!Doctype html>
<html>
<head>
	<meta charset="utf-8">
	<title>Asesoritech</title>
	<link rel="stylesheet" href="{{ asset('bootstrap/css/bootstrap.css') }}">
	<script  src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
	<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
	<link rel="stylesheet" href="{{ asset('css/nav-style.css') }}">
	<script src="{{ asset('fontawesome-5.1.0/js/all.js') }}"></script>
	<link rel="stylesheet" href="{{ asset('fontawesome-5.1.0/css/all.css') }}">
  <link rel="stylesheet" href="{{ asset('css/sb-admin.min.css') }}">
  <meta name="csrf-token" content="{{ csrf_token() }}">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link  media="all" rel="stylesheet" type="text/css" href="{{ asset('css/general.css') }}">
</head>
<body class="sidenav-toggled">
  <nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top" id="mainNav" style="background:#343a40 !important;">
	  <a class="navbar-brand" href="{{ route('inicio') }}"><img class="img-logo" src="{{ asset('img/logo5.png') }}"></a>
    <button id="button-toggler" class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="true" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="navbar-collapse collapse" id="navbarResponsive">
      <ul class="navbar-nav navbar-sidenav" id="exampleAccordion">
      @if (isset(Auth::user()->role) && Auth::user()->role == 'admin')
        <li class="nav-item" data-toggle="tooltip" data-placement="right" title="Admin">
          <a class="nav-link adminLink" href="{{ route('admin') }}">
            <i class="fas fa-tachometer-alt"></i>
            <span class="nav-link-text">Admin</span>
          </a>
        </li>
        <li class="nav-item" data-toggle="tooltip" data-placement="right" title="Mensajes">
          <a class="nav-link mensajesLink" href="{{ route('mensajes') }}">
            <i class="far fa-envelope"></i>
            <span class="nav-link-text">Mensajes</span>
          </a>
        </li>
        <li class="nav-item" data-toggle="tooltip" data-placement="right" title="Usuarios">
          <a class="nav-link userLink" href="{{ route('users') }}">
            <i class="fa fa-users"></i>
            <span class="nav-link-text">Usuarios</span>
          </a>
        </li>
        <li class="nav-item" data-toggle="tooltip" data-placement="right" title="Aplicaciones">
          <a class="nav-link aplicacionesLink" href="{{ route('aplicaciones') }}">
            <i class="fas fa-ruler"></i>
            <span class="nav-link-text">Aplicaciones</span>
          </a>
        </li>
        <li class="nav-item" data-toggle="tooltip" data-placement="right" title="Modulos">
          <a class="nav-link modulosLink" href="{{ route('modulos') }}">
            <i class="fab fa-buromobelexperte"></i>
            <span class="nav-link-text">Modulos</span>
          </a>
        </li>
        <li class="nav-item" data-toggle="tooltip" data-placement="right" title="Requerimientos">
          <a class="nav-link RequerimientosLink" href="{{ route('requerimientos') }}">
            <i class="fas fa-check-double"></i>
            <span class="nav-link-text">Requerimientos</span>
          </a>
        </li>
        <li class="nav-item" data-toggle="tooltip" data-placement="right" title="Perfil">
          <a class="nav-link profileLink" href="{{ route('profileAdmin') }}">
            <i class="far fa-address-book"></i>
            <span class="nav-link-text">Perfil</span>
          </a>
        </li>
        <li class="nav-item">
            <a class="nav-link" href="{{ route('logout') }}" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
            <i class="fas fa-sign-out-alt"></i>
            <span class="nav-link-text">Salir</span>
            </a>
        </li>
        <li>
            <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
              {{ csrf_field() }}
            </form>
        </li>
        </li>
        @elseif (isset(Auth::user()->role) && Auth::user()->role == 'cliente')
        <li class="nav-item" data-toggle="tooltip" data-placement="right" title="Requerimientos">
          <a class="nav-link RequerimientosLink" href="{{ route('requerimientos') }}">
            <i class="fas fa-check-double"></i>
            <span class="nav-link-text">Requerimientos</span>
          </a>
        </li>
        <li class="nav-item" data-toggle="tooltip" data-placement="right" title="Perfil">
          <a class="nav-link profileLink" href="{{ route('profileCliente') }}">
            <i class="far fa-address-book"></i>
            <span class="nav-link-text">Perfil</span>
          </a>
        </li>
        <li class="nav-item" title="Salir">
            <a class="nav-link" href="{{ route('logout') }}" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
            <i class="fas fa-sign-out-alt"></i>
            <span class="nav-link-text">Salir</span>
            </a>
        </li>
        <li>
            <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
              {{ csrf_field() }}
            </form>
        </li>
        </li>
        @elseif (isset(Auth::user()->role) && Auth::user()->role == 'desarrollador')
        <li class="nav-item" data-toggle="tooltip" data-placement="right" title="Desarrollador">
          <a class="nav-link" href="{{ route('desarrollador') }}">
            <i class="fa fa-user"></i>
            <span class="nav-link-text">Desarrollador</span>
          </a>
        </li>
        <li class="nav-item" data-toggle="tooltip" data-placement="right" title="Requerimientos">
          <a class="nav-link" href="{{ route('requerimientos') }}">
            <i class="fas fa-project-diagram"></i>
            <span class="nav-link-text">Requerimientos</span>
          </a>
        </li>
        <li class="nav-item" data-toggle="tooltip" data-placement="right" title="Perfil">
          <a class="nav-link" href="{{ route('profileDesarrollador') }}">
            <i class="far fa-address-book"></i>
            <span class="nav-link-text">Perfil</span>
          </a>
        </li>
        <li class="nav-item">
            <a class="nav-link" href="{{ route('logout') }}" onclick="event.preventDefault(); document.getElementById('logout-form').submit();" title="Salir">
            <i class="fas fa-sign-out-alt"></i>
            <span class="nav-link-text">Salir</span>
            </a>
        </li>
        <li>
            <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
              {{ csrf_field() }}
            </form>
        </li>
        </li>
        @endif
      </ul>
      <ul class="navbar-nav sidenav-toggler">
        <li class="nav-item">
          <a class="nav-link text-center" id="sidenavToggler">
            <i class="fa fa-fw fa-angle-left"></i>
          </a>
        </li>
      </ul>
      <ul class="navbar-nav ml-auto">
      </ul>
      <ul class="navbar-nav ml-auto">
        <li class="nav-item">
          <a class="nav-link" style="color:#007bff"href="{{ route('inicio') }}">
            <i class="far fa-user"></i>
            <span class="nav-link-text" style="color:white">{{ucfirst(@Auth::user()->name)}} {{substr(ucfirst(@Auth::user()->surname), 0, 1)}}.</span>
          </a>
        </li>
        </ul>
    </div>
  </nav>
  <div class="content-wrapper">
    @yield('content')
  </div>
      <!-- Bootstrap core JavaScript-->
    <script src="{{ asset('dashboard_vendor/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
    <!-- Core plugin JavaScript-->
    <script src="{{ asset('dashboard_vendor/jquery-easing/jquery.easing.min.js') }}"></script>
    <!-- Page level plugin JavaScript-->
    <script src="{{ asset('dashboard_vendor/chart.js/Chart.min.js') }}"></script>
    <script src="{{ asset('dashboard_vendor/datatables/jquery.dataTables.js') }}"></script>
    <script src="{{ asset('dashboard_vendor/datatables/dataTables.bootstrap4.js') }}"></script>
    <script src="{{ asset('dashboard_vendor/sb-admin.min.js') }}"></script>
    <!-- Custom scripts for all pages-->
    <script src="{{ asset('dashboard_js/sb-admin.min.js') }}"></script>
    <!-- Custom scripts for this page-->
    <script src="{{ asset('dashboard_js/sb-admin-datatables.min.js') }}"></script>
    <script src="{{ asset('dashboard_js/sb-admin-charts.min.js') }}"></script>
    <script src="{{ asset('js/funciones.js') }}"></script>
</body>
</html>