{% set currentPath = app.request.uri %}
<nav id="main" {{ stimulus_controller('menu') }} data-menu-open-value="true" data-menu-active-class="menu-open">
<div class="menu-title" {{ stimulus_action('menu', 'toggleMenu', 'click') }}>
<span>{% block menuTitle 'Main Menu' %}</span>
</div>
<div class="menu-body" {{ stimulus_target('menu', 'container') }}>
<div class="menu-icons">
<a href="/" title="Home">
<span class="fa fa-home"></span>
</a>
<a href="https://commcent.swc-empire.com" title="COMMCENT">
<span class="fa fa-comments"></span>
</a>
<a href="https://swcombine.com" title="Star Wars Combine" style="padding-top: 2px;">
<svg width="18px" height="18px" viewBox="0 0 180 180">
<use xlink:href="#icon-combine"></use>
</svg>
</a>
</div>
<div class="menu" {{ stimulus_controller('menu') }} data-menu-open-value="{{ ('admin' not in currentPath) and ('instructor' not in currentPath) ? 'true' : 'false' }}" data-menu-active-class="menu-active">
<h2 {{ stimulus_action('menu', 'toggleSubMenu', 'click') }}>Academy</h2>
<ul {{ stimulus_target('menu', 'subMenu') }}>
<li>
<a href="/" class="menu-active-link">
<span><i class='fa fa-caret-right'></i></span>
Home
</a>
</li>
{% if not app.user %}
<li>
<a href="{{ url('auth_login') }}" class="menu-active-link">
<span><i class='fa fa-caret-right'></i></span>
Login
</a>
</li>
{% endif %}
{% if app.user %}
<li>
<a href="{{ url('profile') }}" class="menu-active-link">
<span><i class='fa fa-caret-right'></i></span>
Profile
</a>
</li>
<li>
<a href="{{ url('course_list') }}" class="menu-active-link">
<span><i class='fa fa-caret-right'></i></span>
Courses
</a>
</li>
<li>
<a href="{{ url('auth_logout') }}" class="menu-active-link">
<span><i class='fa fa-caret-right'></i></span>
Logout
</a>
</li>
{% endif %}
</ul>
</div>
{% if is_granted('INSTRUCTOR') %}
<div class="menu" {{ stimulus_controller('menu') }} data-menu-open-value="{{ 'instructor' in currentPath ? 'true' : 'false' }}" data-menu-active-class="menu-active">
<h2 {{ stimulus_action('menu', 'toggleSubMenu', 'click') }}>Instructor</h2>
<ul {{ stimulus_target('menu', 'subMenu') }}>
<li>
<a href="{{ url('instructor_students_list') }}">
<span><i class='fa fa-caret-right'></i></span>
Students
</a>
</li>
<li>
<a href="{{ url('instructor_students_register') }}">
<span><i class='fa fa-caret-right'></i></span>
Register Student
</a>
</li>
</ul>
</div>
{% endif %}
{% if is_granted('ADMIN') %}
<div class="menu" {{ stimulus_controller('menu') }} data-menu-open-value="{{ 'admin' in currentPath ? 'true' : 'false' }}" data-menu-active-class="menu-active">
<h2 {{ stimulus_action('menu', 'toggleSubMenu', 'click') }}>Admin</h2>
<ul {{ stimulus_target('menu', 'subMenu') }}>
<li>
<a href="{{ url('admin_courses_list') }}">
<span><i class='fa fa-caret-right'></i></span>
Courses
</a>
</li>
<li>
<a href="{{ url('admin_users_list') }}">
<span><i class='fa fa-caret-right'></i></span>
Users
</a>
</li>
<li>
<a href="{{ url('admin_pages_list') }}">
<span><i class='fa fa-caret-right'></i></span>
Pages
</a>
</li>
<li>
<a href="{{ url('admin_positions_list') }}">
<span><i class='fa fa-caret-right'></i></span>
Positions
</a>
</li>
</ul>
</div>
{% endif %}
</div>
<svg aria-hidden="true" style="position:absolute;width:0;height:0;overflow:hidden" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<symbol id="icon-combine" viewBox="0 0 32 32">
<title>combine</title>
<path fill="#ddd" stroke="#ddd" stroke-width="1.7778" stroke-miterlimit="4" stroke-linecap="butt" stroke-linejoin="miter" style="stroke:var(--color2,#ddd)" style="fill: var(--color2, #ddd)" d="M0 15.822c0-7.004 5.618-13.689 13.156-13.689 6.009 0 10.844 4.124 10.844 10.311 0 3.698-2.88 7.822-7.289 7.822-3.911 0-6.044-2.489-6.044-5.511-0.64 0-1.067 1.067-1.067 2.133 0 2.951 3.52 6.044 7.644 6.044 5.404 0 11.022-4.942 11.022-12.267 0-4.551-2.204-8.356-4.089-10.667 2.311 1.956 5.689 5.831 5.689 11.911 0 7.004-5.618 13.689-13.156 13.689-6.009 0-10.844-4.124-10.844-10.311 0-3.698 2.88-7.822 7.289-7.822 3.911 0 6.044 2.489 6.044 5.511 0.64 0 1.067-1.067 1.067-2.133 0-2.951-3.52-6.044-7.644-6.044-5.404 0-11.022 4.942-11.022 12.267 0 4.551 2.204 8.356 4.089 10.667-2.311-1.956-5.689-5.831-5.689-11.911z"></path>
</symbol>
</defs>
</svg>
</nav>