{{!
    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 theme_universe/settings-additionalresources-filelist

    Boost Union settingsfilelist layout template.

    Context variables required for this template:
    * files - Array of files

    Example context (json):
    {
        "files": [
            {
                "fileicon": "<img class='icon ' alt='Image (JPEG)' title='Image (JPEG)' src='/theme/image.php/boost_union/core/1666077095/f/jpeg-64'>",
                "filename": "foo.jpg",
                "filetype": "image/jpeg",
                "filesize": "38.5 KB",
                "fileurlpersistent": "http://localhost/pluginfile.php/1/theme_universe/additionalresources/0/foo.jpg",
                "fileurlrevisioned": "http://localhost/pluginfile.php/1/theme_universe/additionalresources/1666077095/foo.jpg"
            }
        ]
    }
}}

<ul class="list-group px-0 mx-0 my-3 settings-additionalresources-filelist">
    {{#files}}
        <li class="border rounded mb-1 list-group-item d-flex justify-content-between">
            <div class="d-flex flex-row">
                {{{fileicon}}}
                <div class="ml-2">
                    <h6 class="mb-0">{{filename}}</h6>
                    <small>{{#str}}mimetype, tool_filetypes{{/str}}: {{filetype}}</small><br>
                    <small>{{#str}}size, repository{{/str}}: {{filesize}}</small><br>
                    <small>{{#str}}additionalresourcesfileurlpersistent, theme_universe{{/str}}: <a href="{{fileurlpersistent}}">{{fileurlpersistent}}</a></small><br>
                    <small>{{#str}}additionalresourcesfileurlrevisioned, theme_universe{{/str}}: <a href="{{fileurlrevisioned}}">{{fileurlrevisioned}}</a></small>
                </div>
            </div>
        </li>
    {{/files}}
</ul>
