{% block mainMenu %}
    <!-- Sidebar Menu -->
    <nav class="mt-2">
        <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
            <!-- Add icons to the links using the .nav-icon class
                 with font-awesome or any other icon font library -->
            <li class="nav-item">
                <a href="{{ path('admin_homepage') }}" class="nav-link {% if app.request.get('_route') == 'admin_homepage' %}active{% endif %}" title="Přehled">
                    <i class="nav-icon fas fa-tachometer-alt"></i>
                    <p>
                        Přehled
                    </p>
                </a>
            </li>
            {% if is_granted('ROLE_ADMIN') %}
                <li class="nav-item">
                    <a href="{{ path('notifications_index') }}" class="nav-link {% if app.request.get('_route') == 'notifications_index' %}active{% endif %}" title="Oznámení">
                        <i class="nav-icon fas fa-bell"></i>
                        <p>
                            Oznámení
                            <span class="right badge badge-danger">{{ notificationService.getNumberOfActiveNotifications }}</span>
                        </p>
                    </a>
                </li>
            {% endif %}
            <li class="nav-item  {% if app.request.get('_route') in ['devices_index','devices_waiting','devices_not_activated','devices_create', 'devices_settings','devices_update'] %}menu-is-opening menu-open{% endif %}">
                <a href="#" class="nav-link" title="Zařízení">
                    <i class="nav-icon fas fa-desktop"></i>
                    <p>
                        Zařízení
                        <i class="fas fa-angle-left right"></i>
                    </p>
                </a>
                <ul class="nav nav-treeview {% if app.request.get('_route') in ['devices_index','devices_waiting','devices_not_activated','devices_create', 'devices_settings', 'devices_detail','devices_update'] %}d-block{% endif %}" style="display: none;">
                    <li class="nav-item">
                        <a href="{{ path('devices_index') }}" class="nav-link {% if app.request.get('_route') in ['devices_index','devices_create', 'devices_detail', 'devices_settings', 'devices_update'] %}active{% endif %}">
                            <i class="far fa-circle nav-icon"></i>
                            <p>Schválená</p>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="{{ path('devices_waiting') }}" class="nav-link {% if app.request.get('_route') == 'devices_waiting' %}active{% endif %}">
                            <i class="far fa-circle nav-icon"></i>
                            <p>Čekající na schválení</p>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="{{ path('devices_not_activated') }}" class="nav-link {% if app.request.get('_route') == 'devices_not_activated' %}active{% endif %}">
                            <i class="far fa-circle nav-icon"></i>
                            <p>Neaktivováno</p>
                        </a>
                    </li>
                </ul>
            </li>
            {% if is_granted('ROLE_ADMIN') %}
                <li class="nav-item">
                    <a href="{{ path('users_index') }}" class="nav-link {% if app.request.get('_route') in ['users_index','user_create','user_update'] %}active{% endif %}" title="Uživatelé">
                        <i class="nav-icon fas fa-users"></i>
                        <p>
                            Uživatelé
                        </p>
                    </a>
                </li>
            {% endif %}
            <li class="nav-header">Profil</li>
            <li class="nav-item">
                <a href="{{ path('profile_update',{'id': app.user.id}) }}" class="nav-link {% if app.request.get('_route') == 'profile_update' %}active{% endif %}" title="Upravit profil">
                    <i class="nav-icon fas fa-user"></i>
                    <p>
                        Upravit profil
                    </p>
                </a>
            </li>
            <li class="nav-item">
                <a href="{{ path('profile_password_change',{'id': app.user.id}) }}" class="nav-link {% if app.request.get('_route') == 'profile_password_change' %}active{% endif %}" title="Změnit heslo">
                    <i class="nav-icon fas fa-key"></i>
                    <p>
                        Změnit heslo
                    </p>
                </a>
            </li>
        </ul>
    </nav>
    <!-- /.sidebar-menu -->
{% endblock %}
