{{!
    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 core_reportbuilder/local/conditions/header

    Template for the header of a condition instance within the condition form

    Example context (json):
    {
        "id": 1,
        "heading": "Date modified",
        "entityname": "Course"
    }
}}
<div class="condition list-group-item list-group-item-action border rounded" data-region="active-condition"
        data-condition-id="{{id}}" data-condition-name="{{heading}}" data-condition-position="{{sortorder}}">
    <div class="condition-header d-flex align-items-center mb-1 border rounded p-2">
        <span class="btn btn-secondary p-1 mr-2">{{>core/drag_handle}}</span>
        <div>
            <div class="d-flex">
                <small class="text-muted">{{entityname}} &bull; {{heading}}</small>
            </div>
        </div>
        <button class="btn btn-link p-0 ml-auto"
                type="button"
                data-action="report-remove-condition"
                title="{{#str}}deletecondition, core_reportbuilder, {{{heading}}}{{/str}}"
                aria-label="{{#str}}deletecondition, core_reportbuilder, {{{heading}}}{{/str}}">
                <span class="btn btn-danger p-1">
                    {{#pix}}e/cancel, core{{/pix}}
                </span>
        </button>
    </div>
