{{!
    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 format_thinkera/unlock

    Unlock the full course: what it opens, and the payment button.

    Example context (json):
    {
        "title": "Unlock the course", "coursename": "Programming",
        "includes": [{"count": 4, "label": "Lesson video", "isvideo": true}],
        "haswidgets": false, "canmanage": true, "addfeeurl": "#", "manualurl": "#", "courseurl": "#"
    }
}}
<div class="tk-learn tk-unlock">
    <section class="tk-unlock-hero">
        <h2>{{title}}</h2>
        <p>{{#str}}unlocklead, format_thinkera{{/str}}</p>
    </section>

    <h3 class="tk-h2">{{#str}}includes, format_thinkera{{/str}}</h3>
    <ul class="tk-unlock-list">
        {{#includes}}
        <li><strong>{{count}}</strong><span>{{> format_thinkera/icon }}{{label}}</span></li>
        {{/includes}}
    </ul>

    {{#haswidgets}}
    <div class="tk-pay">
        {{#widgets}}{{{html}}}{{/widgets}}
    </div>
    {{/haswidgets}}
    {{^haswidgets}}
    <div class="tk-pay">
        <p class="mb-0">{{#str}}nopayment, format_thinkera{{/str}}</p>
        {{#canmanage}}
        <hr>
        <p>{{#str}}nopayment_admin, format_thinkera{{/str}}</p>
        <a class="btn btn-primary" href="{{addfeeurl}}">{{#str}}enrolmentoptions, enrol{{/str}}</a>
        <a class="btn btn-secondary" href="{{manualurl}}">{{#str}}participants{{/str}}</a>
        {{/canmanage}}
    </div>
    {{/haswidgets}}

    <p class="mt-4"><a href="{{courseurl}}">{{#str}}alllessons, format_thinkera{{/str}}</a></p>
</div>
