<?php
/**
 * Copyright © 2016 TuanHatay. All rights reserved.
 */

?>
<?php
/**
 * Top menu for store
 *
 * @see \Rokanthemes\VerticalMenu\Block\Verticalmenu
 */
?>
<?php
    $_helper = $this->helper('Rokanthemes\VerticalMenu\Helper\Data');
    $_config = $_helper->getConfig('verticalmenu');
    $columnsLimit = 0;
    if($_config['general']['enable']) {
?>
<?php $_menu = $block->getVerticalMenuHtml(); ?>

<nav class="navigation verticalmenu" role="navigation">
    <ul>
        <?php echo $_menu; ?>
    </ul>
</nav>

<script type="text/javascript">
    require([
        'jquery',
        'rokanthemes/verticalmenu'
    ], function ($) {
        $(".verticalmenu").VerticalMenu();
    });
</script>
<?php
    } else {
?>
<?php $_menu = $block->getHtml('level-top', 'submenu', $columnsLimit); ?>

<nav class="navigation verticalmenu" role="navigation">
    <ul data-mage-init='{"menu":{"responsive":true, "expanded":true, "position":{"my":"left top","at":"left bottom"}}}'>
        <?php /* @escapeNotVerified */ echo $_menu; ?>
    </ul>
</nav>

<?php
    }
?>