{{!
    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_coursegen/add_activity_ai_button

    TODO describe template add_activity_ai_button

    Example context (json):
    {
        "ismoodle45": true,
        "sectionnum": 2,
        "beforemod": 193,
        "arialabel": "Insert an activity or resource before 'Q &amp;amp; A Forum for Students'"
    }
}}
<div>
<button class="local_coursegen-add-activity-ai-button section-modchooser btn add-content d-flex justify-content-center align-items-center p-1 icon-no-margin"
    data-action="local_coursegen/add_activity_ai"
    data-sectionnum="{{sectionnum}}"
    {{#beforemod}}
        data-beforemod="{{beforemod}}"
        aria-label="{{arialabel}}"
        tabindex="0"
        title="{{#str}} addactivitywithia, local_coursegen {{/str}}"
    {{/beforemod}}
>
    {{#beforemod}}
        <span class="local_coursegen-sparkles-icon" title="{{#str}} addactivitywithia, local_coursegen {{/str}}">
            {{#pix}} sparkles, local_coursegen {{/pix}}
        </span>
        <span class="local_coursegen-sparkles-icon white" title="{{#str}} addactivitywithia, local_coursegen {{/str}}">
            {{#pix}} sparkles-white, local_coursegen {{/pix}}
        </span>
    {{/beforemod}}
    {{^beforemod}}
        {{#showfulltext}}
        <div class="px-1">
            <span class="local_coursegen-sparkles-icon">
                {{#pix}} sparkles, local_coursegen {{/pix}}
            </span>
            <span class="local_coursegen-sparkles-icon white">
                {{#pix}} sparkles-white, local_coursegen {{/pix}}
            </span>
            <span class="activity-add-text pr-1">{{#str}}addactivitywithia, local_coursegen{{/str}}</span>
        </div>
        {{/showfulltext}}
        {{^showfulltext}}
        <span class="local_coursegen-sparkles-icon" title="{{#str}} addactivitywithia, local_coursegen {{/str}}">
            {{#pix}} sparkles, local_coursegen {{/pix}}
        </span>
        <span class="local_coursegen-sparkles-icon white" title="{{#str}} addactivitywithia, local_coursegen {{/str}}">
            {{#pix}} sparkles-white, local_coursegen {{/pix}}
        </span>
        {{/showfulltext}}
    {{/beforemod}}
</button>
</div>
