{{!
    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_dttutor/admin_avatar_selector

    Admin avatar selector grid template

    Context variables required for this template:
    * avatars - Array of avatar objects with properties: num, path, selected, label

    Example context (json):
    {
        "avatars": [
            {
                "num": "01",
                "path": "/local/dttutor/pix/avatars/avatar_profesor_01.png",
                "selected": true,
                "label": "Avatar 1",
                "cachebuster": 1234567890
            }
        ]
    }
}}
<div class="avatar-selector-grid">
    {{#avatars}}
    <div class="avatar-option {{#selected}}selected{{/selected}}" data-value="{{num}}" onclick="selectDttutorAvatar('{{num}}')">
        <img src="{{path}}?v={{cachebuster}}" alt="{{label}}">
        <div class="avatar-option-label">{{label}}</div>
        <input type="radio" name="s_local_dttutor_avatar" value="{{num}}" {{#selected}}checked="checked"{{/selected}}>
    </div>
    {{/avatars}}
</div>
