{{!
    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_plugnmeet/recording_details

    Example context (json):
    {
        "can_download": true,
        "download_url": "http://example.com/video.mp4",
        "can_delete": true,
        "delete_url": "http://example.com/delete",
        "back_url": "http://example.com/back",
        "details": [
            {"label": "Recording ID", "value": "rec123"},
            {"label": "File Size", "value": "120 MB"}
        ]
    }
}}
<div class="d-flex justify-content-between align-items-center mb-3">
    <h3 class="m-0">{{#str}}recording_details, mod_plugnmeet{{/str}}</h3>
    <div class="btn-group">
        {{#can_download}}
            <a href="{{download_url}}" class="btn btn-primary" target="_blank">{{#str}}download, mod_plugnmeet{{/str}}</a>
        {{/can_download}}
        {{#can_delete}}
            <a href="{{delete_url}}" class="btn btn-danger" onclick="return confirm('{{#str}}delete_confirm, mod_plugnmeet{{/str}}');">{{#str}}delete, mod_plugnmeet{{/str}}</a>
        {{/can_delete}}
        <a href="{{back_url}}" class="btn btn-secondary">{{#str}}back_to_list, mod_plugnmeet{{/str}}</a>
    </div>
</div>

{{#download_url}}
<video controls="controls" style="width: 100%; height: auto; max-width: 800px; display: block; margin-bottom: 20px;">
    <source src="{{download_url}}" type="video/mp4">
    {{#str}}browser_not_support_video, mod_plugnmeet{{/str}}
</video>
{{/download_url}}

<table class="generaltable">
    {{#details}}
    <tr>
        <td><strong>{{label}}</strong></td>
        <td>{{value}}</td>
    </tr>
    {{/details}}
</table>
