{{!
    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/venue

    This template renders the view for the text task

    Example context (json):
    {
        "name": "Welcome",
        "content": ""
    }
}}
    <h6>{{ name }}</h6>
        <div class="block_deft_venue p-3">{{{ content }}}
            <div class="peer-container">
            {{^ active }}
             <button class="btn btn-primary m-1 w-100" {{^ canjoin }} disabled="disabled" {{/ canjoin }} data-action="join" {{^ popup }} data-type="{{# full }}modal{{/ full}}{{^ full }}static{{/ full}}" data-contextid="{{ contextid }}" {{/ popup }} title="{{# str }} join, block_deft {{/ str }}"><i class="icon fa fa-sign-in"></i> {{# str }} join, block_deft {{/ str }}</button>
            {{/ active }}
            {{# canjoin }}
            {{# active }}
             <button class="btn btn-info m-1" data-action="join" {{^ popup }} data-type="{{# full }}modal{{/ full }}{{^ full }}static{{/ full }}" data-contextid="{{ contextid }}" {{/ popup }} title="{{# str }} rejoin, block_deft {{/ str }}"><i class="icon fa fa-repeat"></i> {{# str }} rejoin, block_deft {{/ str }}</button>
            <button class="btn btn-danger m-1" type="button" data-action="close" title="{{# str }} leave, block_deft {{/ str }}"><i class="icon fa fa-sign-out"></i>{{# str }} leave, block_deft {{/ str }}</button>
             {{^ popup }}
                 <button class="btn btn-secondary m-1" data-action="show" title="{{# str }} show, core {{/ str }}"><i class="icon fa fa-eye"></i> {{# str }} show, core {{/ str }}</button>
                 <button class="card-link btn btn-secondary m-1" data-action="raisehand" title="{{# str }} raisehand, block_deft {{/ str }}"><i class="icon fa fa-hand-grab-o"></i> {{# str }} raisehand, block_deft {{/ str }}</button>
                 <button class="btn btn-success m-1 hidden" data-action="lowerhand" title="{{# str }} lowerhand, block_deft {{/ str }}"><i class="icon fa fa-hand-stop-o"></i> {{# str }} lowerhand, block_deft {{/ str }}</button>
             {{/ popup }}
            {{^ mute }}
                <button class="card-link btn btn-secondary m-1" data-action="mute" title="{{# str }} mute, block_deft {{/ str }}"><i class="icon fa fa-microphone"></i> {{# str }} mute, block_deft {{/ str }}</button>
            {{/ mute }}
            {{# mute }}
                <button class="card-link btn btn-warning m-1 bg-warning" data-action="unmute" title="{{# str }} unmute, block_deft {{/ str }}"><i class="icon fa fa-microphone-slash m-0"></i> {{# str }} unmute, block_deft {{/ str }}</button>
            {{/ mute }}
            {{/ active }}
            {{/ canjoin }}
                    {{# count }}
                        <span class="float-right p-1">
                        {{# limit }} {{# str }} guests, block_deft, {{ count }} / {{ limit }}{{/ str }}{{/ limit }}
                        {{^ limit }} {{# str }} guests, block_deft, {{ count }} {{/ str }}{{/ limit }}
                        </span>
                        <div class="peers position-absolute bg-light p-3 border border-secondary">
                             {{# peers }}
                                 <div class="peer">{{ fullname }}
                                     {{# mute }}<i class="icon fa fa-microphone-slash m-0"></i>{{/ mute }}
                                 </div>
                             {{/ peers }}
                        </div>
                     {{/ count }}
            </div>
        </div>
{{# js }}
    require(['block_deft/venue'], function(Venue) {
        Venue.init();
    });
{{/ js }}
