{{!
    This file is part of Moodle - https://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_deepler/module'; // Full name of the plugin (used for diagnostics)./translate_module

    Template purpose and description.

    Classes required for JS:
    * none

    Data attributes required for JS:
    * none

    Context variables required for this template:
    * pluginname
    * id
    * level
    * activitydesc
    * fields
    * childs

    Example context (json):
    {
        "id":"myid",
        "level":"1",
        "activitydesc":"MyActivity",
        "pluginname":"book",
        "fields":"<div>some fields</div>",
        "childs":"<div>some childs</div>",

        "id" : "myid",
        "level" : "3",
        "hasicon" : true,

        "icon":"https://path/to/icon.png",
        "itempurpose":"purpose",
        "link": "https://test.org"
    }
}}
<div id='{{pluginname}}' class='activity-item local_deepler__activity py-2 {{visibilityclass}}'>
    <small class="badge rounded-pill bg-secondary text-dark" data-action="local_deepler__hiddenfromstudents">
        <i class="fa fa-eye-slash" aria-hidden="true"></i>&nbsp;<small>{{#str}}hiddenfromstudents{{/str}}</small>
    </small>
    <span id='{{id}}' class='h{{level}} sectionname course-content-item d-flex align-self-stretch align-items-center mb-0 p-2'>
        {{> local_deepler/activity_icon }}
        {{activitydesc}}
        {{> local_deepler/translate_editbutton }}
    </span>
    {{{fields}}}
    {{#childs}}
        <div class="divider"><hr></div>
    {{/childs}}

    {{{childs}}}
</div>
