@if ($item['submenu'] == [])

 <li class="menu-list menu-{{ $item['id'] }} dd-item dd3-item">
 		<div class="dd-handle dd3-handle p-0 m-0">
 			
 		</div>
	    <div href="#" class="dd3-content configmenus-{{ $item['id'] }} ">
	      <i class="{{ $item['icon_text'] }} icon-configs{{ $item['id'] }}"></i>
	      
		    <span class="rename-{{ $item['id'] }}">
		        {{ $item['name'] }}
		    </span>


			<span class="config" style="float: right;">
				<a href="#" class="additems" data-id="{{ $item['id'] }}">Add</a>

				<a href="#" class="item-menu" data-id="{{ $item['id'] }}">
					<i class="open-ico icon-arrow-down32"></i>
				</a>
			</span>
	    </div>
		<div class="info-menu option-{{ $item['id'] }}">
	    		<input type="hidden" name="order[]" value="{{ $item['order'] }}">
	    		<input type="hidden" name="idupdate[]" value="{{ $item['id'] }}">
				<div class="form-group">
	    			<input type="text" name="name[]" value="{{ $item['name'] }}" data-id="{{ $item['id'] }}" onkeyup="rename(this); return false" class="form-control form-cont" placeholder="Nombre del menu">
	    		</div>
	    		<div class="form-group">
	    			<input type="text" name="url[]" value="{{ $item['slug'] }}" class="form-control form-cont" placeholder="Url a la que dirige">
	    		</div>
		    	<div class="form-group">
	    			<input type="text" name="ico[]" value="{{ $item['icon_text'] }}" data-tipe="{{ $item['id'] }}" onkeyup="rename(this); return false" class="form-control  form-cont" placeholder="Iconos">
	    		</div>

			    <div class="row">
					<div class="col-6"><a href="#" data-url="{{ url('template/'.$item['id']) }}" data-id="{{ $item['id'] }}" onclick="deleteSubmit(this); return false" class="btn btn-danger btn-sm"><i class="icon-trash"></i></a></div>
				</div>
	  
	    </div>
  </li>
@else
    <li class="menu-list menu-glob menu-{{ $item['id'] }} dd-item dd3-item"  >
    	<div class="dd-handle dd3-handle p-0 m-0">
 			
 		</div>
    	<div class="dd3-content configmenus-{{ $item['id'] }}"> 
    		<i class="{{ $item['icon_text'] }} icon-configs{{ $item['id'] }}"></i>
    		<span class="rename-{{ $item['id'] }}">{{ $item['name'] }}</span>

			<span class="config" style="float: right;">
				<a href="#" class="additems" data-id="{{ $item['id'] }}">Add</a>

				<a href="#" class="item-menu" data-id="{{ $item['id'] }}">
					<i class="open-ico icon-arrow-down32"></i>
				</a>
			</span>
    	</div>
    	<div class="info-menu option-{{ $item['id'] }}" style="display: none; margin-bottom:5px; margin-right: 5px;" >
    			<input type="hidden" name="idupdate[]" value="{{ $item['id'] }}">
				<div class="form-group">
	    			<input type="text" name="name[]" value="{{ $item['name'] }}" data-id="{{ $item['id'] }}" onkeyup="rename(this); return false" class="form-control form-cont" placeholder="Nombre del menu">
	    		</div>
	    		<div class="form-group">
	    			<input type="text" name="url[]" value="{{ $item['slug'] }}" class="form-control form-cont" placeholder="Url a la que dirige">
	    		</div>
		    	<div class="form-group">
	    			<input type="text" name="ico[]" value="{{ $item['icon_text'] }}"  onkeyup="rename(this); return false" data-tipe="{{ $item['id'] }}" class="form-control  form-cont" placeholder="Iconos">
	    		</div>
		    <div class="row mt-2" >
		    	<div class="col-6">
	        		<button data-url="{{ url('template/'.$item['id']) }}"  data-id="{{$item['id']}}" onclick="deleteSubmit(this); return false" class="btn btn-danger btn-sm"> <i class="icon-trash"></i>
	        		</button>
        		</div>
				<div class="col-6 text-right">
				</div>
	        </div>
        </div>
        	<ol  data-submenu-title="{{ $item['name'] }}" class="list-menubo dd-list">
	            @foreach ($item['submenu'] as $submenu)
	                @if ($submenu['submenu'] == [])
	                    <li class="menu-list menu-{{ $submenu['id'] }} dd-item" >
	                    	<div class="dd-handle dd3-handle p-0 m-0">
 			
 							</div>
	                    	<div class="dd3-content configmenus-{{ $submenu['id'] }} "  >
								<i class="{{ $submenu['icon_text'] }} icon-configs{{ $submenu['id'] }}"></i> 
	                    		<span class="rename-{{ $submenu['id'] }}">{{ $submenu['name'] }} </span><small>(Submenu)</small>
						        
								<span class="config" style="float: right;">
									<a href="#" class="additems" data-id="{{ $submenu['id'] }}">Add</a>

									<a href="#" class="item-menu" data-id="{{ $submenu['id'] }}">
										<i class="open-ico icon-arrow-down32"></i>
									</a>
								</span>
							</div>
							<div class="info-menu option-{{ $submenu['id'] }}">
    								<input type="hidden" name="order[]" value="{{ $submenu['order'] }}">
    								<input type="hidden" name="idupdate[]" value="{{ $submenu['id'] }}">
    								<div class="form-group">
						    			<input type="text" name="name[]" value="{{ $submenu['name'] }}" data-id="{{ $submenu['id'] }}" onkeyup="rename(this); return false" class="form-control form-cont" placeholder="Nombre del menu">
						    		</div>
						    		<div class="form-group">
						    			<input type="text" name="url[]" value="{{ $submenu['slug'] }}" class="form-control form-cont" placeholder="Url a la que dirige">
						    		</div>
							    	<div class="form-group">
						    			<input type="text" name="ico[]" value="{{ $submenu['icon_text'] }}" onkeyup="rename(this); return false" data-tipe="{{ $submenu['id'] }}" class="form-control form-cont" placeholder="Iconos">
						    		</div>
						    		<div class="row">
						    			<div class="col-6"><a href="#" data-url="{{ url('template/'.$submenu['id']) }}" data-id="{{ $submenu['id'] }}" onclick="deleteSubmit(this); return false" class="btn btn-danger btn-sm"><i class="icon-trash"></i></a></div>
						    		</div>
						    </div>
						</li>
	                @else
	                    @include('System.views.menu-items.items', [ 'item' => $submenu,'subitem' => '3'])
	                @endif
	            @endforeach
	        </ol>
      </li>
@endif