{{!
    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 mod_videotime/view_mobile

    This template will render the video time mobile template

    Variables required for this template:
    * cmid - course module id
    * haspro - whether pro features are available
    * instance - video thime instance
    * intro - activity description
    * video_description - vimeo video description
    * video_url - vimeo url

    Example context (json):
    {
        "cmid": 30,
        "haspro": true,
        "instance": {},
        "intro": "Watch this",
        "video_url": "https://vimeo.com/253989945",
        "video_description": "UX design tips"
    }

}}
{{#instance}}
    <ion-card>
        <ion-card-content>
            {{{intro}}}
        </ion-card-content>
    </ion-card>
    {{# iframe }}
        <iframe src="{{ url }}" style="height: 100vw; width: 100%;"></iframe>
    {{/ iframe }}
    {{^ iframe }}
        <div class="vimeo-embed" data-vimeo-url="{{vimeo_url}}" id="vimeo-embed-{{cmid}}" data-cmid="{{cmid}}" data-has-pro="{{has_pro}}"></div>
    {{/ iframe }}
    <ion-card>
        <ion-card-content>
            {{{video_description}}}
        </ion-card-content>
    </ion-card>
{{/instance}}
