{{!
    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_calendar/event_item

    Calendar event item.

    The purpose of this template is to render the event item.

    Classes required for JS:
    * none

    Data attributes required for JS:
    * none

    Example context (json):
    {
        "id": 1,
        "name": "Sample event name",
        "normalisedeventtype": "course",
        "course": {
            "id": 1
        },
        "canedit": true,
        "candelete": true,
        "isactionevent": true,
        "icon": {
            "key": "i/courseevent",
            "component": "core",
            "alttext": "Some course event"
        },
        "editurl": "#",
        "url": "#"
    }
}}
<div class="row event_lists p0" {{!
    }} data-type="event" {{!
    }} data-course-id="{{course.id}}" {{!
    }} data-event-id="{{id}}" {{!
    }} data-eventtype-{{normalisedeventtype}}="1" {{!
    }} data-event-title="{{name}}" {{!
    }} data-event-count="{{eventcount}}" {{!
    }}>

  <div class="col-xl-12 pl15-xl pl0">
    <div class="blog_grid_post style2 event_lists mb35">
      <div class="details">
        <h3>{{{name}}} {{#canedit}}
            {{#candelete}}
              <a href="{{deleteurl}}" data-action="delete">
                {{#pix}}t/delete, core, {{#str}}delete{{/str}}{{/pix}}
              </a>
            {{/candelete}}
            {{^isactionevent}}
              <a href="{{editurl}}" data-action="edit">
                {{#pix}}t/edit, core, {{#str}}edit{{/str}}{{/pix}}
              </a>
            {{/isactionevent}}
          {{/canedit}}
        </h3>

        {{> core_calendar/event_details }}
        {{#isactionevent}}
          <div class="mt30">
            <a href="{{url}}" class="btn dbxshad btn-sm btn-thm circle white">{{#str}} gotoactivity, core_calendar {{/str}}</a>
          </div>
        {{/isactionevent}}
      </div>
    </div>
  </div>
</div>
