{{--<ul class="nav nav-pills nav-stacked">
	
</ul> --}}
<div class="sidebar-nav">
	<div role="navigation" class="navbar navbar-inverse">
		<div class="navbar-header">
			<button data-target=".sidebar-navbar-collapse" data-toggle="collapse" class="navbar-toggle collapsed" type="button">
				<span class="sr-only">Toggle navigation</span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</button>
		</div>
		<div class="navbar-collapse sidebar-navbar-collapse collapse" style="height: 1px;">
			<ul id="sidenav01" class="nav navbar-nav">
				@foreach ($items as $item)
					@if(isset($item['submenu']))
						{{-- En caso de tener submenu --}}
						<li {{ (isset($active_module) && $active_module == $item['name']) ? 'class="active"' : '' }} >
							<a class="dropdown-toggle" data-parent="#sidenav01" data-toggle="collapse" href="#submenu{{ $item['id'] }}">
								<span class="{{ $item['icon'] }}"></span><span class="title">{{ $item['title'] }}</span>
								<span class="caret pull-right">
							</a>
							<div 
								id="submenu{{ $item['id'] }}" 
								class="collapse 
										{{ (isset($active_module) && $active_module == $item['name']) ? 'in' : '' }}
								">
								<ul class="nav nav-list">
									@foreach ($item['submenu'] as $subitem)
										<li class=" {{ $subitem['active'] }}">
											<a href="{{ $subitem['url'] }}">{{ $subitem['title'] }}</a>
										</li>
									@endforeach
								</ul>
							</div>
						</li>
					@else
						{{-- En caso de ser un menú normal --}}
						<li  {{ (isset($active_module) && $active_module == $item['name']) ? 'class="active"' : '' }} >
							<a href="{{ $item['url'] }}">
								<span class="{{ $item['icon'] }}"></span><span class="title">{{ $item['title'] }}</span>
							</a>
						</li>
					@endif
				@endforeach
				<li {{ (isset($active_module) && $active_module == 'articles') ? 'class="active"' : '' }}>
					<a class="dropdown-toggle" data-parent="#sidenav01" data-toggle="collapse" href="#toggleDemo1">
						<span class="glyphicon glyphicon-cloud"></span> {{ trans('articles::label.module_name') }} <span class="caret pull-right"></span>
					</a>
					<div id="toggleDemo1" class="collapse ">
						<ul class="nav nav-list">
							@foreach ($categories_menu as $cat)
								<li><a href="/admin/articles/{{ $cat->id }}">{{ $cat->title }}</a></li>
							@endforeach
						</ul>
					</div>
				</li>
				
				<!--
				
				<li><a href="#"><span class="glyphicon glyphicon-lock"></span> Normalmenu</a></li>
				<li><a href="#"><span class="glyphicon glyphicon-calendar"></span> WithBadges <span class="badge pull-right">42</span></a></li>
				<li><a href=""><span class="glyphicon glyphicon-cog"></span> PreferencesMenu</a></li>-->
			</ul>
		</div><!--/.nav-collapse -->
	</div>
</div>