{{!
    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_edwiserpagebuilder/event-list-item

    This template renders an task list item for the schedule task block.

    Example context (json):
    {}
}}
<li data-region="task-item" data-id="{{id}}"
    class="list-group-item  align-items-start p-p-6 d-flex {{#due}}red-600{{/due}} justify-content-between border-0">
    <div class="checkbox-custom checkbox-success checkbox-lg">
        <div class="task-actionable d-flex align-items-center position-relative">
            <input class="d-inline-flex align-self-start task-item-checkbox" type="checkbox" name="checkbox" {{#completed}}checked{{/completed}}>
            <div class="d-flex flex-column flex-gap-d5">
                <label class="item-title m-0">
                    <div class="panel-heading p-0 h-semibold-6" id="task-subject-{{id}}" role="tab" title="{{subject}}">
                        <span data-toggle="collapse" href="#task-summary-{{id}}" aria-expanded="true"
                            aria-controls="task-summary-{{id}}">
                            {{subject}}
                        </span>
                        {{^visible}}<i class="fa fa-eye-slash ml-1"></i>{{/visible}}
                    </div>
                    <div class="panel-collapse collapse" id="task-summary-{{id}}" aria-labelledby="task-subject-{{id}}"
                        role="tabpanel" style="">
                        <div class="panel-body p-0">
                            {{summary}}
                        </div>
                    </div>
                </label>
                <div class="item-due-date" title="{{timedue}}">
                    <span>{{timedue}}</span>
                </div>
            </div>
        </div>
    </div>
    <div class="d-flex align-items-center flex-gap-2">
        <div class="item-members d-flex flex-row flex-gap-d5">
            {{#assignedto}}
            {{^count}}
            <img class="avatar" title="{{name}}" alt="{{name}}" src="{{profile}}">
            {{/count}}
            {{#count}}
            <span title="{{#str}} moreassignee, local_edwiserpagebuilder, {{count}}{{/str}}"
                class="btn btn-sm btn-icon btn-default btn-outline btn-round d-flex align-items-center justify-content-center user-count">
                +{{count}}
            </span>
            {{/count}}
            {{/assignedto}}
        </div>

        {{#createdby}}
        <button data-action="edit" class="btn btn-sm btn-icon btn-default btn-outline btn-round" title="edit">
            <i class="icon fa fa-pencil m-0" aria-hidden="true"></i>
        </button>
        {{/createdby}}
    </div>
</li>
