{{!
    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_adaptable/headerlayoutone

    Header style one.

    Example context (json):
    {
        "hasmobileprimarynav": true,
        "headerbg": "",
        "langmenu": "",
        "loginoruser": "",
        "menuslinkright": false,
        "mobileprimarynavicon": "Markup",
        "pageheaderoriginal": true,
        "responsiveheader": "d-none d-lg-flex",
        "responsivesearchicon": "",
        "searchandsocialheader": "",
        "searchandsocialnavbar": "",
        "searchandsocialnavbarextra": "",
        "shownavbar": true,
        "headerlogo": "",
        "headertitle": "Adaptable",
        "topmenus": ""
    }
}}
<header id="adaptable-page-header-wrapper"{{{headerbg}}}>
    <div id="header1" class="above-header">
        <div class="container">
            <nav class="navbar navbar-expand btco-hover-menu">
                {{#hasmobileprimarynav}}
                <button class="navbar-toggler nav-link aabtn d-block d-lg-none px-1 my-1 border-0" data-toggler="drawers" data-action="toggle" data-target="theme_adaptable-drawers-primary">
                    {{{mobileprimarynavicon}}}
                    <span class="visually-hidden">{{#str}}sidepanel, core{{/str}}</span>
                </button>
                {{/hasmobileprimarynav}}

                <div class="collapse navbar-collapse">
                {{^menuslinkright}}{{#topmenus}}
                <div class="my-auto m-1">{{{topmenus}}}</div>
                {{/topmenus}}{{/menuslinkright}}
                    <ul id="adaptable-user-nav" class="navbar-nav ms-auto my-auto">
                        {{#menuslinkright}}{{#topmenus}}
                        <li class="my-auto m-1">{{{topmenus}}}</li>
                        {{/topmenus}}{{/menuslinkright}}

                        {{#searchandsocialnavbar}}
                        <li class="nav-item navbarsearchsocial mx-md-1 my-auto{{searchandsocialnavbarextra}}">
                            {{{searchandsocialnavbar}}}
                        </li>
                        {{/searchandsocialnavbar}}

                        {{#shownavbar}}
                        <li id="nav-popover-container" class="my-auto d-flex">
                            {{{output.navbar_plugin_output}}}
                        </li>
                        {{/shownavbar}}

                        {{{langmenu}}}

                        {{{output.page_heading_menu}}}

                        {{{loginoruser}}}
                    </ul>
                </div>
            </nav>
        </div>
    </div>

    <div id="page-header" class="main-header-row{{#responsiveheader}} {{responsiveheader}}{{/responsiveheader}}">
        <div class="container">
            <div class="row d-flex justify-content-start align-items-center h-100">
                {{#pageheaderoriginal}}
                <div class="col-lg-8 p-0">
                    <div class="bd-highlight d-flex">
                        {{#headerlogo}}{{{headerlogo}}}{{/headerlogo}}
                        {{#headertitle}}{{{headertitle}}}{{/headertitle}}
                    </div>
                    <div id="course-header">
                        {{{output.course_header}}}
                    </div>
                </div>
                <div class="col-lg-4 d-flex justify-content-end">
                    {{#searchandsocialheader}}
                        {{{searchandsocialheader}}}
                    {{/searchandsocialheader}}
                </div>
                {{/pageheaderoriginal}}

                {{^pageheaderoriginal}}
                <div class="col-8">
                    <div class="d-flex justify-content-between align-items-center h-100 bd-highlight">
                        {{#headertitle}}
                            {{{headertitle}}}
                        {{/headertitle}}
                        {{#searchandsocialheader}}
                            {{{searchandsocialheader}}}
                        {{/searchandsocialheader}}
                    </div>
                </div>
                <div class="col-4 p-0">
                    {{#headerlogo}}
                    <div class="d-flex justify-content-end bd-highlight">
                        {{{headerlogo}}}
                    </div>
                    {{/headerlogo}}
                </div>
                {{/pageheaderoriginal}}
            </div>
            {{^pageheaderoriginal}}
            <div class="row">
                <div class="col-12 p-0 my-auto">
                    <div id="course-header">
                        {{{output.course_header}}}
                    </div>
                </div>
            </div>
            {{/pageheaderoriginal}}
        </div>
    </div>

    {{#shownavbar}}
        {{> theme_adaptable/headernavbar}}
    {{/shownavbar}}

</header>

{{#hasmobileprimarynav}}
{{< theme_adaptable/primary-drawer-mobile }}
{{/ theme_adaptable/primary-drawer-mobile }}
{{/hasmobileprimarynav}}
