<?php
/**
 * Magiccart 
 * @category 	Magiccart 
 * @copyright 	Copyright (c) 2014 Magiccart (http://www.magiccart.net/) 
 * @license 	http://www.magiccart.net/license-agreement.html
 * @Author: DOng NGuyen<nguyen@dvn.com>
 * @@Create Date: 2016-02-08 22:57:12
 * @@Modify Date: 2018-05-30 14:19:25
 * @@Function:
 */

$menu = $this->_sysCfg->topmenu;
if(!$menu['enabled']) return;

// drawMainMenu vs DrowMobileMenu
$menuHtml = $this->drawMainMenu();
$mobileMenu = $menuHtml['mobile'];
$desktop 	= $menuHtml['desktop'];
$ids  = explode(',', $menu['notIncludeNav']);
foreach ($ids as $id) { unset($desktop[$id]); }
// drawHomeMenu
$drawHomeMenu = $menu['home'] ? $this->drawHomeMenu() : '';
// drawMainMenu
$drawMainMenu = $menu['mainCat'] ? implode("\n", $desktop) : '';
// drawExtMenu ExtraMenu
$drawExtraMenu = $menu['extraCat'] ? $this->drawExtraMenu() : '';
?>
<nav class="navigation mean-nav navigation-mobile" role="navigation" data-action="navigation">
	<ul class="nav-mobile">
		<?php echo $mobileMenu ?>
		<?php echo $drawExtraMenu ?>
	</ul>
</nav>
<div class="magicmenu clearfix">
	<ul class="nav-desktop <?php /* @escapeNotVerified */ echo $menu['sticker'] ? 'sticker' : '' ?>" data-fullwidth="<?php /* @escapeNotVerified */ echo $menu['fullWidth'] ?>" >
		<?php echo $drawHomeMenu ?>
		<?php echo $drawMainMenu ?>
		<?php echo $drawExtraMenu ?>
	</ul>
</div>
<script type="text/javascript">
	require(['jquery','magiccart/easing','magicmenu']);
</script>
