{{!
    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 block_deft/main

    This template renders the main content area for the deft choice block.

    Example context (json):
    {
        "contextid": 2,
        "uniqueid": "eworio",
        "token": "dladfjlakerlaa3j4lr",
        "throttle": 100
    }
}}

<div id="block-deft-{{uniqid}}" class="block-deft block-cards" data-region="deft-main">
    {{# canuse }}<a href="{{ manageurl }}" class="btn btn-secondary">{{# str }} manage, block_deft {{/ str }}</a>{{/ canuse }}
    <div class="" data-region="block_deft_venue_static" data-contextid="{{ contextid }}">
    </div>
    <div class="container-fluid p-0">
        {{> block_deft/view }}
    </div>
</div>
{{#js}}
    require([
        'block_deft/comment',
        {{# room }}'block_deft/jitsi/refresh'{{/ room }}{{^ room }}'block_deft/refresh'{{/ room }}
    ], function(Comment, Refresh) {
        var refresh = new Refresh({{ contextid }}, '#block-deft-{{uniqid}} [data-region="deft-view"]', '{{ token }}', {{ throttle }}, '{{ server }}', '{{ room }}');
        Comment.init({{ contextid }}, '#block-deft-{{uniqid}}', refresh);
    });
{{/js}}
