<nav class="navbar navbar-default">
	<ul class="nav navbar-nav">
		<li><a href=".">Inicio</a></li>
		@if (\App\Contract\Auth::isIn())
			@if (\App\Contract\Auth::checkAccess('ventas'))
			<li role="presentation" class="dropdown">
				<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
				Ventas <span class="caret"></span>
				</a>
				@include('layout.menu.ventas')
			</li>
			@endif

			@if (\App\Contract\Auth::checkAccess('proyectos'))
			<li role="presentation" class="dropdown">
				<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
				Proyectos <span class="caret"></span>
				</a>
				@include('layout.menu.proyectos')
			</li>
			@endif

			@if (\App\Contract\Auth::checkAccess('inmobiliarias'))
				<li><a href="{{url('', ['p' => 'inmobiliarias', 'a' => 'list'])}}">Inmobiliarias</a></li>
			@endif

			@if (\App\Contract\Auth::checkAccess('viewInformesContabilidad'))
			<li role="presentation" class="dropdown">
				<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
				Contabilidad <span class="caret"></span>
				</a>
				@include('layout.menu.informes')
			</li>
			@endif

			@if (\App\Contract\Auth::checkAccess('viewHerramientas'))
			<li role="presentation" class="dropdown">
				<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
				Herramientas <span class="caret"></span>
				</a>
				@include('layout.menu.herramientas')
			</li>
			@endif
		@else
			<li><a href="{{url('', ['p' => 'auth', 'a' => 'login'])}}">Ingresar</a></li>
		@endif
	</ul>
	@if (\App\Contract\Auth::isIn())
		<ul class="nav navbar-nav navbar-right">
			<li role="presentation" class="dropdown">
				<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
				{{\App\Contract\Auth::User()->name}} <span class="caret"></span>
				</a>
				@include('layout.menu.login')
			</li>
			@if (\App\Contract\Auth::checkAccess('buscar'))
				<li style="font-size: large; border-left: 1px solid #e7e7e7;"><a href="{{url('', ['p' => 'buscar'])}}"><span class="glyphicon glyphicon-search"></span></a></li>
				<li style="margin-right: 15px;">&nbsp;</li>
			@endif
		</ul>
	@endif
</nav>
