{{!
    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 aiprovider_datacurso/webservice/actions
  Renders the action buttons area. Keeps data-region attributes for JS hooks.

  Example context (json):
  {
    "retryonly": false,
    "registration": {"lastsent": "2025-01-10 09:30"},
    "isconfigured": true,
    "needsrepair": false
  }
}}
<div class="d-flex gap-2 mb-4" style="gap: 1rem;">
  {{#retryonly}}
    <button class="btn btn-secondary" data-action="retry" data-region="aiprovider_datacurso/webservice-btn-retry">
      <i class="fa fa-wrench mr-2"></i>{{#str}} ws_btn_retry, aiprovider_datacurso {{/str}}
    </button>
  {{/retryonly}}
  {{^retryonly}}
    {{#registration.lastsent}}
      {{#isconfigured}}
        <button class="btn btn-warning" data-action="regenerate" data-region="aiprovider_datacurso/webservice-btn-regenerate">
          <i class="fa fa-refresh mr-2"></i>{{#str}} ws_btn_regenerate, aiprovider_datacurso {{/str}}
        </button>
      {{/isconfigured}}
      {{#needsrepair}}
        <button class="btn btn-secondary" data-action="retry" data-region="aiprovider_datacurso/webservice-btn-retry">
          <i class="fa fa-wrench mr-2"></i>{{#str}} ws_btn_retry, aiprovider_datacurso {{/str}}
        </button>
      {{/needsrepair}}
    {{/registration.lastsent}}
    {{^registration.lastsent}}
      {{^isconfigured}}
        <button class="btn btn-primary" data-action="setup" data-region="aiprovider_datacurso/webservice-btn-setup">
          <i class="fa fa-cogs mr-2"></i>{{#str}} ws_btn_setup, aiprovider_datacurso {{/str}}
        </button>
      {{/isconfigured}}
    {{/registration.lastsent}}
  {{/retryonly}}
</div>
