<nav class="navbar navbar-expand-lg navbar-light bg-light mt-2 rounded">
    <div class="container-fluid">
	<a class="navbar-brand" href="/">Horários do Funchal</a>
	<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#conteudoNavbarSuportado" aria-controls="conteudoNavbarSuportado" aria-expanded="false" aria-label="Toggle navigation">
	    <span class="navbar-toggler-icon"></span>
	</button>
	<div
	    class="collapse navbar-collapse justify-content-end"
	    id="conteudoNavbarSuportado"
	>
	    <ul class="navbar-nav justify-content-end">
		<li class="nav-item">
		    <a class="nav-link" href="/contactar">Contactar</a>
		</li>
		
		<li class="nav-item">
		    <a class="nav-link" href="/paragens">Notificações de paragens</a>
		</li>

		<% if (typeof isAdmin != 'undefined') { %>

			<li class="nav-item">
				<a class="nav-link" href="/pass">Passe</a>
			</li>
		    
		    <% if (isAdmin == true ) { %>
			<li class="nav-item dropdown">
			    <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
				Gerir
			    </a>
			    <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
				<li><a class="dropdown-item" href="/emitPass">Emitir passe</a></li>
			    </ul>
			</li>
		    <% } %>
		    <li class="nav-item">
			<a class="nav-link" href="/login/logout">Logout <i class="fa fa-user"></i> </a>
		    </li>
		<%} else { %>
		    <li class="nav-item">
			<a class="nav-link" href="/login">Login <i class="fa fa-user"></i> </a>
		    </li>
		<% } %>
	    </ul>
	</div>
    </div>
</nav>
