{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template theme_foundation/primarymenu

    The Primary menu.

    Example context (json):
    {
        "nodearray": [
            {
                "text": "Home",
                "action": "/index.php?redirect=0",
                "active": "true"
            },
            {
                "text": "Dashboard",
                "action": "/my"
            },
            {
                "text": "Courses",
                "action": "/course"
            },
            {
                "text": "Site Administration",
                "action": "/admin/search.php"
            }
        ],
        "moremenuid": "614c104dbacfa"
    }
}}
<ul id="moremenu-{{moremenuid}}-{{navbarstyle}}" role="menubar" class="navbar-nav mx-auto nav more-nav {{navbarstyle}}">
    {{#nodearray}}
        <li data-key="{{key}}" class="nav-item" role="none presentation" data-forceintomoremenu="{{#forceintomoremenu}}true{{/forceintomoremenu}}{{^forceintomoremenu}}false{{/forceintomoremenu}}">
        {{#is_action_link}}
            <a role="menuitem" class="nav-link{{#classes}} {{.}}{{/classes}}"{{#actionattributes}} {{name}}="{{value}}"{{/actionattributes}}
                 href="{{{url}}}{{{action}}}" title="{{title}}" data-disableactive="true" tabindex="-1">
                {{{icon}}}{{#text}}<span class="d-none d-lg-inline">{{text}}</span>{{/text}}
            </a>
            {{#action_link_actions}}
                {{> core/actions }}
            {{/action_link_actions}}
        {{/is_action_link}}
        {{^is_action_link}}
            <a role="menuitem" class="nav-link{{#isactive}} active{{/isactive}}{{#classes}} {{.}}{{/classes}}"
                href="{{{url}}}{{{action}}}"
                title="{{title}}"
                {{#isactive}}aria-current="true"{{/isactive}}
                {{^isactive}}tabindex="-1"{{/isactive}}
            >
                {{{icon}}}{{#text}}<span class="d-none d-lg-inline">{{text}}</span>{{/text}}
            </a>
        {{/is_action_link}}
        </li>
    {{/nodearray}}
</ul>
