{{!
    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/tutor_ia_toggle

    Floating toggle button to open/close the Tutor-IA drawer.

    Context variables required for this template:
    * uniqid - Unique identifier
    * avatarurl - URL of the selected avatar
    * position - Position preset (right/left/custom)
    * position_style - Inline CSS style for positioning (calculated in PHP)

    Example context (json):
    {
        "uniqid": "tia_123456",
        "avatarurl": "/local/dttutor/pix/avatars/avatar_profesor_01.png",
        "position": "right",
        "position_style": "right: 2rem; bottom: 6rem;"
    }
}}
<button
    id="tutor-ia-toggle-{{uniqid}}"
    class="tutor-ia-toggle-button tutor-ia-position-{{position}}"
    aria-expanded="false"
    type="button"
    data-action="tutor-ia-toggle"
    data-position="{{position}}"
    style="{{position_style}}"
    title="{{#str}}open, local_dttutor{{/str}}"
    aria-label="{{#str}}open, local_dttutor{{/str}}">
    <img src="{{avatarurl}}" alt="{{#str}}pluginname, local_dttutor{{/str}}" class="tutor-ia-avatar-toggle">
</button>
{{> core_message/message_jumpto }}
