{{!
    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 block_mwa_dashboard/chat_sidebar
    @copyright 2026 Bruno Porto
    @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
}}
{{#conversations}}
  <div style="display:flex;align-items:center;border-radius:var(--radius);{{#active}}background:var(--blue-dim){{/active}}">
    <div style="flex:1;padding:.4rem .5rem;cursor:pointer;font-size:.76rem;overflow:hidden;{{#active}}color:var(--blue);font-weight:700;{{/active}}" data-chat-load="{{id}}">
      <div style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">{{title}}</div>
      <div style="font-size:.63rem;opacity:.6;">{{date}}</div>
    </div>
    <span data-chat-del="{{id}}" title="{{#str}}chat_delete_conv, block_mwa_dashboard{{/str}}" aria-label="{{#str}}chat_delete_conv, block_mwa_dashboard{{/str}}" role="button" style="cursor:pointer;padding:.2rem .35rem;font-size:.75rem;opacity:.4;flex-shrink:0;" onmouseenter="this.style.opacity=1" onmouseleave="this.style.opacity=.4"><span aria-hidden="true">{{#str}}chat_delete_icon, block_mwa_dashboard{{/str}}</span></span>
  </div>
{{/conversations}}
{{^conversations}}
  <div style="font-size:.75rem;color:var(--muted);padding:.5rem;">{{emptylabel}}</div>
{{/conversations}}
