<div class="starterpack-input-group toggle-group pt-24 starterpack_admin_wrapper">
	<div class="starterpack-input pt-8 pb-0">
		<input class="starterpack-toggle starterpack-toggle-light main-toggle show-hide"  data-revised="1" id="enable_starterpack_admin" name="enable_starterpack_admin" value="1" type="checkbox"
			<?php checked(AdminStarterPack\starterpack_field_setting( 'enable_starterpack_admin'), 1, true) ?>/>
		<label class="starterpack-toggle-btn" for="enable_starterpack_admin"></label>
		<label class="toggle-label pl-4" for="enable_starterpack_admin">
		<?php _e('Control other Administrators menus', 'starterpack') ?>
		</label>
		<div class="starterpack-help">
			<?php _e('Choose the menus that other admins will see', 'starterpack') ?>
			<span class="starterpack-help custom" style="font-style:italic">
			<?php _e(' ', 'starterpack') ?>
			</span>
		</div>
	</div>
	<div class="sub-fields">
		<div class="starterpack-body-header w-50 mt-20">
			<h2><?php _e('Sidebar Menus', 'starterpack') ?></h2>
		</div>
		<div class="starterpack-input-group mt-20 mb-15 starterpack-toggle-wrapper starterpack-menus-settings">
			<input type="hidden" value="index.php" name="admin_menus[main][]">
			<input type="hidden" value="index.php_starterpack_index-php" name="admin_menus[sub][]">
			<?php
			
				$menu_class = AdminStarterPack\starterpack_instance()->AdminControl();
				$admin_menu = AdminStarterPack\starterpack_field_setting('admin_menus');
				
				$setting_admin_menus = AdminStarterPack\starterpack_field_setting('admin_menus');
				
				if( $admin_menus = $menu_class->get_admin_menus() ): 
				    echo '<ul class="list-options">';
				    
				    foreach ($admin_menus as $main_key => $main_menu):
				
				     /*   if( $main_key == $sidebar_url ) {
				            continue;
				        }
				    */
				        $main_menu_checked = ' checked="checked"';
				        $menu_name = $main_menu['name'];
				        $menu_slug = $main_menu['slug'];
				        if( is_array($setting_admin_menus) && isset($setting_admin_menus['main']) && in_array($menu_slug,  $setting_admin_menus['main'] )) {
				            $main_menu_checked = '';
				        }
				        
				        $disabled = '';
				        if(  $main_key == 'index.php' ) {
				            $disabled = ' disabled';
				        }
				
				        ?>
			<li>
				<input class="starterpack-toggle starterpack-toggle-light main-toggle"<?php echo $disabled?> id="admin_menus_<?php echo $main_key?>" name="admin_menus[main][]" value="<?php echo $menu_slug ?>" type="checkbox"<?php echo $main_menu_checked?>/>
				<label class="starterpack-toggle-btn<?php echo $disabled?>" for="admin_menus_<?php echo $main_key?>"></label><label class="toggle-label" for="admin_menus_<?php echo $main_key?>"><?php _e( $menu_name , 'starterpack') ?></label> 
				<?php
					if( isset($main_menu['submenus']) && count( $main_menu['submenus'] )):
					    echo '<a href="javascript:void(0)" class="starterpack-toggle-arrow"></a><ul class="sub_menu_wrapper">';
					    $submenus = $main_menu['submenus'];
					
					    foreach ($submenus as $submenu_key => $sub_menu):
					
					        $sub_menu_name = $sub_menu['name'];
					        $checked_sub = ' checked="checked"';
					        $submenu_value = $sub_menu['slug'];
					        $disabled = '';
					        if(  $submenu_key == 'index-php' ) {
					            $disabled = ' disabled';
					        }elseif( $submenu_key == 'dhiratara') {
					            continue;
					        }
					
					        if( is_array($setting_admin_menus) && (isset($setting_admin_menus['sub']) && in_array($submenu_value,  $setting_admin_menus['sub'] ) )) {
					            $checked_sub = '';
					        }
					        ?>
			<li>
				<input class="starterpack-toggle starterpack-toggle-light sub-toggle"<?php echo $disabled?> id="admin_sub_menus_<?php echo $submenu_key?>" name="admin_menus[sub][]" value="<?php echo $submenu_value ?>" type="checkbox" <?php echo $checked_sub ?>/>
				<label class="starterpack-toggle-btn<?php echo $disabled?>" for="admin_sub_menus_<?php echo $submenu_key?>"></label><label class="toggle-label" for="admin_sub_menus_<?php echo $submenu_key?>"><?php _e( $sub_menu_name , 'white-label-cms') ?></label> 
			</li>
			<?php
				endforeach;
				echo '</ul>';
				endif;
				?>
			</li>
			<?php 
				endforeach;
				echo '</ul>';
				endif;?>
		</div>
		<div class="starterpack-body-header w-50 mt-15">
			<h2><?php _e('Admin Bar Menus', 'starterpack') ?></h2>
		</div>
		<div class="starterpack-input-group starterpack-toggle-wrapper mt-20 starterpack-menus-settings control-admin-bar">
			<?php
				$menu_class = AdminStarterPack\starterpack_instance()->AdminControl();
				$admin_bar_menu_setting = AdminStarterPack\starterpack_field_setting('admin_bar_menus');
				
				if ($admin_bar_menus = $menu_class->get_admin_bar_menus()) {
				  echo $menu_class->get_admin_bar_menu_html($admin_bar_menus);
				}
				?>
		</div>
		
	</div><!-- end sub-fields -->
	
</div>