{{!
    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.

    Edwiser RemUI
    @package theme_remui
    @copyright (c) 2023 WisdmLabs (https://wisdmlabs.com/)
    @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

}}
{{!
    @template theme_remui/enrol_headersection
}}
<div class="section header-section">
    <div class="title-meta-wrapper doted-border d-flex flex-column">
        <div>
            {{#editing}}
            <a href="{{editcoursetitle}}" target="_blank" class="textlink-with-icon text-link-semibold d-flex flex-gap-0d5 align-items-center p-py-1">
                <span>{{#str}}editcoursetitle, theme_remui{{/str}}</span>
                <span class="edw-icon edw-icon-Shortcut"></span>
            </a>
            {{/editing}}
            <h2 class="course-title h-bold-2 d-block m-0">
                {{{coursename}}}
            </h2>
        </div>

        <div class="course-metadata">
            {{#instructor}}
            <div class="instructors-wrapper">
                {{#editing}}
                <a href="{{editinstructorspageurl}}" target="_blank" class="textlink-with-icon text-link-semibold d-flex flex-gap-0d5 align-items-center p-py-1">
                    <span>{{#str}}manageinstructors, theme_remui{{/str}}</span>
                    <span class="edw-icon edw-icon-Shortcut"></span>
                </a>
                {{/editing}}
                <div class="instructors">
                    <div class="instructors-stack-imgs">
                        <span class="avatars">
                            {{#avatars}}
                            <span class="avatar position-relative">
                                <a href="{{teacherprofileurl}}" class="position-absolute w-100 h-100"></a>
                                {{{avatars}}}
                            </span>
                            {{/avatars}}
                        </span>
                    </div>
                    <div class="d-flex flex-gap-d5">
                        <div class="instructors-details details-block">
                            <span class="label details--title">{{#str}}curatedby, theme_remui{{/str}}</span>
                            <span class="count details--info">{{name}}</span>
                        </div>
                        {{#instructorcount}}<a id="enrol_instructorscount" href="#linkinstructors"  class="nav-link loading p-0 instructorscount mt-auto">+{{instructorcount}}</a>{{/instructorcount}}
                    </div>
                </div>
            </div>
            {{/instructor}}

            {{#editing}}
                {{^instructor}}
                    <div class="instructors-wrapper">
                        <a href="{{editinstructorspageurl}}" target="_blank" class="textlink-with-icon text-link-semibold d-flex flex-gap-0d5 align-items-center p-py-1">
                            <span>{{#str}}manageinstructors, theme_remui{{/str}}</span>
                            <span class="edw-icon edw-icon-Shortcut"></span>
                        </a>
                        <div class="instructors opacity-50">
                            <div class="instructors-stack-imgs">
                                <span class="avatars">
                                    <span class="avatar position-relative">
                                        <a class="d-inline-block aabtn"><span class="userinitials size-35">N</span></a>
                                    </span>
                                </span>
                            </div>
                            <div class="d-flex flex-gap-d5">
                                <div class="instructors-details details-block">
                                    <span class="label details--title">{{#str}}curatedby, theme_remui{{/str}}</span>
                                    <span class="count details--info">{{#str}}noinstructor, theme_remui{{/str}}</span>
                                </div>
                            </div>
                        </div>
                    </div>
                {{/instructor}}
            {{/editing}}

            <div class="category">
                {{#editing}}
                <a href="{{editcategorylink}}" target="_blank" class="textlink-with-icon text-link-semibold d-flex flex-gap-0d5 align-items-center p-py-1">
                    <span>{{#str}}changecategory, theme_remui{{/str}}</span>
                    <span class="edw-icon edw-icon-Shortcut"></span>
                </a>
                {{/editing}}
                <div class="category-details  details-block">
                    <span class="label details--title">{{#str}}category, theme_remui{{/str}}</span>
                    <span class="categoryname details--info">{{{categoryname}}}</span>
                </div>
            </div>
            {{#rnrreviewdesign}}
            <div class="ratings-review {{#noratingfound}} noratingavailable {{/noratingfound}}">
                {{#editing}}
                <a href="{{editapprovalpageurl}}" target="_blank" class="textlink-with-icon text-link-semibold d-flex flex-gap-0d5 align-items-center p-py-1">
                    <span>{{#str}}editreviewapproval, theme_remui{{/str}}</span>
                    <span class="edw-icon edw-icon-Shortcut"></span>
                </a>
                {{/editing}}
                <div class="ratings-details details-block">
                    <span class="label details--title">{{#str}}review, theme_remui{{/str}}</span>
                    <span class="ratings details--info">
                        {{{rnrreviewdesign}}}
                    </span>
                </div>
            </div>
            {{/rnrreviewdesign}}
        </div>
        {{#comment}}
            <div class="divider"></div>
            <div class="course-stats d-flex flex-gap-6">
                <div class="stat-container">
                    <span class="edw-icon edw-icon-Group-user large"></span>
                    <span class="stat">
                        <b class="count">{{enrolledstudents}}</b>
                        {{#str}}studentsenrolled, theme_remui{{/str}}
                    </span>
                </div>
                <div class="stat-container">
                    <span class="edw-icon edw-icon-Book large"></span>
                    <span class="stat">
                        <b class="count">{{totallessons}}</b>
                        {{#str}}lesson, theme_remui{{/str}}
                    </span>
                </div>
            </div>
        {{/comment}}
    </div>
    {{#introvideourl}}
        <div class="video-container doted-border">
            {{#editing}}
            <a href="{{editcourseintorvideourllink}}" target="_blank" class="textlink-with-icon text-link-semibold d-flex flex-gap-0d5 align-items-center p-py-2 p-px-3 ml-auto">
                <span>{{#str}}addchangevideo, theme_remui{{/str}}</span>
                <span class="edw-icon edw-icon-Shortcut"></span>
            </a>
            {{/editing}}
            <iframe class="videoframe" src="{{{introvideourl}}}" frameborder="0" title="Video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
        </div>
    {{/introvideourl}}

    {{#editing}}
        {{^introvideourl}}
            <div class="video-container doted-border">
                <a href="{{editcourseintorvideourllink}}" target="_blank" class="textlink-with-icon text-link-semibold d-flex flex-gap-0d5 align-items-center p-py-2 p-px-3 ml-auto">
                    <span>{{#str}}addchangevideo, theme_remui{{/str}}</span>
                    <span class="edw-icon edw-icon-Shortcut"></span>
                </a>

                <div  class="videoframe empty-box d-flex justify-content-center align-items-center">
                    <p class="m-0 para-semibold-2">
                        {{#str}}novideomessage, theme_remui{{/str}}
                    </p>
                </div>
            </div>
        {{/introvideourl}}
    {{/editing}}
</div>
