{{!
    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 block_xp/navbar-widget

    The navbar widget.

    Please note that the URLs can be null depending on whether the user has the permission
    to access them, or whether their associated features are enabled. The `linkurl` is
    the URL that XP considers to be the most relevant out of those available.

    Example context (json):
    {
        "linkurl": "https://yoursite.com/",
        "badgehtml": "<span>Badge here</span>",
        "infopageurl": "https://yoursite.com/",
        "leaderboardurl": "https://yoursite.com/",
        "teamleaderboardurl": "https://yoursite.com/"
    }
}}
<div class="block_xp">
    <a {{# linkurl }}href="{{ . }}"{{/ linkurl }} class="xp-px-2 xp-flex xp-h-full xp-items-center xp-justify-end xp-no-underline [&_.block\_xp-level]:xp-mx-0">
        {{{ badgehtml }}}
    </a>
</div>