{% trans_default_domain 'frontend' %}
{% set currentPath = app.request.pathInfo %}
{% set currentRoute = app.request.attributes.get('_route') %}
<div class="nk-quick-nav-close-icon d-lg-none nk-nav-toggle" data-target="sidebarMenu">
<i class="ni ni-arrow-right"></i>
</div>
<ul class="nk-menu nk-menu-main text-center {% if is_granted('ROLE_USER') %}d-none d-lg-block{% endif %}">
<li class="nk-menu-item mb-4 mb-lg-0">
<a href="{{ path('shop_video_list')}}" class="nk-menu-link{% if currentPath matches '*/video*' %} active{% endif %}" data-original-title="" title="">
<span class="nk-menu-text">{{ 'menu.video'|trans }}</span>
</a>
</li>
<li class="nk-menu-item mb-4 mb-lg-0">
<a href="{{ path('deal_list')}}" class="nk-menu-link{% if currentPath matches '*/deal*' %} active{% endif %}" data-original-title="" title="">
<span class="nk-menu-text">{{ 'menu.deal'|trans }}</span>
</a>
</li>
<li class="nk-menu-item mb-4 mb-lg-0">
<a href="{{ path('feed') }}" class="nk-menu-link{% if currentPath matches '*/feed*' %} active{% endif %}" data-original-title="" title="">
<span class="nk-menu-text">{{ 'menu.feed'|trans }}</span>
</a>
</li>
<li class="nk-menu-item mb-4 mb-lg-0 d-inline-flex align-items-baseline">
<a href="{{ path('message', {filter: 'all'}) }}" class="nk-menu-link{% if currentPath matches '*/mails*' %} active{% endif %}" data-original-title="" title="">
<span class="nk-menu-text">{{ 'menu.mails'|trans }}</span>
</a>
{% if is_granted('ROLE_USER') %}
{% set messageCount = get_crud_action('App\\Controller\\Message\\MessageCountController').params.count %}
<span class="message-count{% if messageCount == 0 %} d-none{%- endif %}">{{ messageCount }}</span>
{% endif %}
</li>
<li class="nk-menu-item mb-4 mb-lg-0">
<a href="{{ path('products') }}" class="nk-menu-link {% if currentPath matches '*(/about|/help\-center)*' %}active{% endif %}" data-original-title="" title="">
<span class="nk-menu-text">{{ 'menu.about'|trans }}</span>
</a>
</li>
</ul>
{% if is_granted('ROLE_USER') %}
<div class="user-toggle d-lg-none account-nav">
<div class="mr-1">
<em class="icon dp-icon-user"></em>
</div>
<div class="user-info">
<div class="user-name" title="{{ app.user }}"><span class="text-ellipsis">{{ app.user }}</span></div>
</div>
<div class="d-flex justify-center mt-1 mb-1 mr-4 ml-4 d-lg-none">
<button id="purchase-credits" class="btn btn-round btn-secondary justify-center" data-toggle="modal" data-target="#purchase-credits-dialog">
<i class="dp-icon-buy_credits"></i>
</button>
</div>
<div class="dropdown-inner d-lg-none">
{% set currentPath = app.request.pathInfo %}
{% set currentRoute = app.request.attributes.get('_route') %}
<ul class="link-list">
<li>
<a href="{{ path('feed') }}" class="justify-center{% if currentPath matches '*/feed*' %} active{% endif %}">
<span>{{ 'menu.home'|trans }}</span>
</a>
</li>
<li class="d-inline-flex align-items-baseline">
<a href="{{ path('message', {filter: 'all'}) }}" class="justify-center{% if currentPath matches '*/mails*' %} active{% endif %}" data-original-title="" title="">
<span >Mails</span>
</a>
{% if is_granted('ROLE_USER') %}
{% set messageCount = get_crud_action('App\\Controller\\Message\\MessageCountController').params.count %}
<span class="message-count{% if messageCount == 0 %} d-none{%- endif %}">{{ messageCount }}</span>
{% endif %}
</li>
<li>
<a href="{{ path('deal_list') }}" class="justify-center{% if currentPath matches '*/deal*' %} active{% endif %}">
<span>{{ 'menu.deal'|trans }}</span>
</a>
</li>
<li>
<a href="{{ path('products') }}" class="justify-center{% if currentRoute == 'products' %} active{% endif %}">
<span>{{ 'menu.about'|trans }}</span>
</a>
</li>
</ul>
</div>
<div class="dropdown-inner d-lg-none">
<ul class="link-list">
<li>
{%- if not app.user.activeCreditsMembership -%}
{% set membershipLink = path('credits_membership_create') %}
{%- else -%}
{%- if app.user.activeCreditsMembership.isCancellationScheduledRequested() or app.user.activeCreditsMembership.getCancellationScheduled() -%}
{% set membershipLink = path('credits_membership_undo_cancel') %}
{%- else -%}
{% set membershipLink = path('credits_membership_cancel') %}
{%- endif -%}
{%- endif -%}
<a href="{{ membershipLink }}" class="justify-center{% if currentRoute in ['credits_membership_create', 'credits_membership_cancel', 'credits_membership_undo_cancel'] %} active{% endif %}">
<span>{{ 'menu.membership'|trans }}</span>
</a>
</li>
<li>
<a href="{{ path('credit_history') }}" class="justify-center{% if currentPath == '/account/activity' %} active{% endif %}">
<span>{{ 'menu.credits_history'|trans }}</span>
</a>
</li>
</ul>
</div>
<div class="dropdown-inner d-lg-none">
<ul class="link-list">
<li>
<a class="js-darkSwitch dark-switch justify-center" href="#">
<span id="light-mode" class="{{ isThemeModeLight ? 'active' }}">
<span>{{ 'header.theme_switch.dark_mode'|trans }}</span>
</span>
<span id="dark-mode" class="{{ not isThemeModeLight ? 'active' }}">
<span>{{ 'header.theme_switch.light_mode'|trans }}</span>
</span>
</a>
</li>
<li><a href="{{ path('app_logout') }}" class="justify-center"><span>{{ 'menu.logout'|trans }}</span></a></li>
</ul>
</div>
</div>
{% endif %}