{{!
    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_snap/home_page_coursebox

 @package   theme_snap
 @copyright Copyright (c) 2024 Open LMS
 @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
}}
<div class="{{classes}}" data-courseid="{{courseid}}" data-type="{{data-type}}">
    <div class="snap-home-course">
        <!--Card content-->
        <div class="favouriteicon">
            {{#isloggedin}}
            <button class="btn unset-favourite {{^isfavourite}}d-none{{/isfavourite}}" data-courseid="{{courseid}}"
                title="{{#str}}removefromfavourites, block_myoverview{{/str}}"
                aria-label="{{#str}}removefromfavourites, block_myoverview{{/str}}" tabindex="0">
                <i class="fa-solid fa-star"></i>
            </button>
            <button class="btn set-favourite {{#isfavourite}}d-none{{/isfavourite}}" data-courseid="{{courseid}}"
                title="{{#str}}addtofavourites, block_myoverview{{/str}}"
                aria-label="{{#str}}addtofavourites, block_myoverview{{/str}}" tabindex="0">
                <i class="fa-regular fa-star"></i>
            </button>
            {{/isloggedin}}
        </div>
        {{{hiddeninfobadge}}}
        <a href="{{courselink}}" title="{{coursename}}">
            <div class="{{imageclasses}}" style="{{imagestyle}}"></div>
        </a>
        <div class="card-header row">
            <a class="snap-home-course-title col-xl-10 col-lg-9 col-md-9 col-sm-10 col-10"" href="{{courselink}}" title="{{coursename}}">
                <span class="">{{coursename}}</span>
            </a>
            <button class="btn more-info col-1" data-toggle="modal" data-target="#coursemodal{{courseid}}"
                title="{{#str}}showcourseinformation, theme_snap{{/str}}"
                aria-label="{{#str}}showcourseinformation, theme_snap{{/str}}" tabindex="0">
                    <i class="fa-solid fa-circle-info"></i>
            </button>
            <div class="additional-options row">
                <div class="col-12">
                    {{{coursecategoryname}}}
                 </div>
            </div>
            {{#isloggedin}}
            <div class="coursestudents row">
                <span class="col"><i class="fa-regular fa-circle-user"></i> {{enrolledstudents}}</span>
            </div>
            {{/isloggedin}}
        </div>
    </div>
    {{> theme_snap/course_card_modal }}
</div>
