{{!
    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 local_coursegen/editor_navbar

    Floating top navbar for the AI course creation page, styled like
    reportbuilder/edit.php. Rendered with `popup` pagelayout.

    Context variables required for this template:
    * title string   - Page title displayed on the navbar.
    * logourl string - URL of the plugin logo image.
    * closeurl string - URL for the close button (top-right).

    Example context (json):
    {
        "title": "Course creator AI",
        "logourl": "https://example.com/local/coursegen/pix/logo.png",
        "closeurl": "https://example.com/my/courses.php"
    }
}}
<nav class="navbar fixed-top navbar-light bg-white navbar-expand align-items-center aicoursecreation-navbar"
     aria-label="{{#str}}createwithai, local_coursegen{{/str}}">
    <div class="container-fluid">
        <div class="d-flex align-items-center gap-2">
            <button class="aicoursecreation-navbar-trigger" id="courseaiMenuTrigger" type="button" aria-label="{{#str}}courseai_sidebar_toggle, local_coursegen{{/str}}">
                {{#logourl}}
                <img src="{{logourl}}" alt="" class="aicoursecreation-navbar-logo courseai-nav-logo" />
                {{/logourl}}
                <svg class="courseai-nav-menuicon" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
                    <line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="18" x2="21" y2="18"/>
                </svg>
            </button>
            <h1 class="h5 m-0">{{{title}}}</h1>
        </div>
        <div class="ms-auto d-flex">
            <a href="{{closeurl}}" class="btn btn-secondary" role="button"
               title="{{#str}}closebuttontitle, local_coursegen{{/str}}">
                {{#str}}close, local_coursegen{{/str}}
            </a>
        </div>
    </div>
</nav>
