{% if app.user.appTheme == 1 %}
    {% set theme = 'navbar-light' %}
{% elseif app.user.appTheme == 1 %}
    {% set theme = 'navbar-light' %}
{% else %}
    {% set theme = 'navbar-dark' %}
{% endif %}
<div class="navbar navbar-expand-lg {{ theme}} navbar-static">
    <div class="d-flex flex-1 d-lg-none">
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-mobile">
            <i class="icon-paragraph-justify3"></i>
        </button>
        <button class="navbar-toggler sidebar-mobile-main-toggle" type="button">
            <i class="icon-transmission"></i>
        </button>
    </div>

    {% set logo = asset('assetics/admin/global_assets/images/logo_light.png') %}
   {% set logo = asset('assetics/admin/global_assets/images/logo_light.png') %}
{% if context.get['app'] is defined and context.get['app'].filename is defined %}
    {% set logo = vich_uploader_asset(context.get['app'], 'imageFile') | imagine_filter('logo') %}
{% endif %}


    <div class="navbar-brand text-center text-lg-left" style="background: url({{ logo }}) left top no-repeat; background-size: contain;">
        {#<a href="{{ path('admin.home') }}" class="d-inline-block">
            {% include 'admin/layouts/_partials/_logo.html.twig' %}
        </a>#}
    </div>

    <div class="collapse navbar-collapse order-2 order-lg-1" id="navbar-mobile">
        <ul class="navbar-nav">
            {% if is_granted('ROLE_SUPER_ADMIN') or is_granted('ROLE_ADMIN') %}
                {{ notifications() }}
            {% endif %}
        </ul>
    </div>

    <ul class="navbar-nav flex-row order-1 order-lg-2 flex-1 flex-lg-0 justify-content-end align-items-center">
        <li class="nav-item nav-item-dropdown-lg dropdown dropdown-user h-100">
            <a href="javascript:" class="navbar-nav-link d-flex align-items-center dropdown-toggle" data-toggle="dropdown">
                {% if app.user.filename %}
                    <img src="{{ vich_uploader_asset(app.user, 'imageFile') | imagine_filter('avatar') }}"
                         height="34" class="rounded-circle mr-2" alt="{{ app.user.fullname }}">
                {% else %}
                    <img src="{{ asset('assetics/admin/global_assets/images/demo/users/face1.jpg') }}"
                         height="34" class="rounded-circle mr-2" alt="{{ app.user.fullname }}">
                {% endif %}
                <span>{{ app.user.fullname }}</span>
            </a>

            <div class="dropdown-menu dropdown-menu-right">
                {% if is_granted('ROLE_ADMIN') or is_granted('ROLE_SUPER_ADMIN') %}
                    <a href="{{ path('admin.administrateurs.compte.edit', {'id': app.user.id}) }}"
                       class="dropdown-item">
                        <i class="icon-user-plus"></i> Mon compte
                    </a>
                {% endif %}
                {% if is_granted('ROLE_USER') %}
                    <a href="{{ path('admin.utilisateurs.compte.edit', {'id': app.user.id}) }}"
                       class="dropdown-item">
                        <i class="icon-user-plus"></i> Mon compte
                    </a>
                {% endif %}
                <div class="dropdown-divider"></div>
                {% if is_granted('ROLE_ADMIN') or is_granted('ROLE_SUPER_ADMIN') %}
                    <a href="{{ path('admin.configurations.edit', {'id': company_id}) }}"
                       class="dropdown-item">
                        <i class="icon-cog5"></i> Paramètres application
                    </a>
                {% endif %}
                <a href="{{ path('security_logout') }}" class="dropdown-item">
                    <i class="icon-switch2"></i> Se déconnecter
                </a>
            </div>
        </li>
    </ul>
</div>