{#
/*
 * Copyright © ProgramCMS. All rights reserved.
 * See COPYING.txt for license details.
 *
 * Developed by Mohamed EL QUCHIRI <elquchiri@gmail.com>
 */
#}
<span style="font-size: 13px; font-weight: bold">{{ block.trans('Scope:') }}</span>
<ul class="navbar-nav website-switcher mb-2 mb-lg-0">
    <li class="nav-item dropend">
        <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
            {{ block.getCurrentScopeLabel() }}
        </a>
        <ul class="dropdown-menu scope-dropdown" style="box-shadow: 2px 2px 2px #CCC">
            <a class="dropdown-item" href="{{ block.getCurrentSwitcherUrl() }}">{{ block.getDefaultLabel() }}</a>
            {% for website in block.getAllWebsites() %}
                <a class="dropdown-item {% if not block.isSwitchWebsites() %}disabled{% endif %}" href="{{ block.getWebsiteSwitcherUrl(website) }}">{{ website.getWebsiteName() }}</a>
                {% for websiteGroup in website.getGroups() %}
                    <a class="dropdown-item website-switcher-group {% if not block.isSwitchGroups() %}disabled{% endif %}" href="{{ block.getWebsiteGroupSwitcherUrl(websiteGroup) }}">{{ websiteGroup.getWebsiteGroupName() }}</a>
                    {% for websiteView in websiteGroup.getWebsiteViews() %}
                        <a class="dropdown-item website-switcher-view {% if not block.isSwitchViews() %}disabled{% endif %}" href="{{ block.getWebsiteViewSwitcherUrl(websiteView) }}">{{ websiteView.getWebsiteViewName() }}</a>
                    {% endfor %}
                {% endfor %}
            {% endfor %}
        </ul>
    </li>
</ul>