{{!
    This file is part of Moodle - https://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_certificatebeautiful/list-certificate

    Example context (json):
    {
      "class-root": "certificate-container",
      "pages": [
        {
          "title": "Página 1",
          "pagina": "<div>Conteúdo da Página 1</div>",
          "addpage_href": "/add-page/1",
          "addpage_title": "Adicionar Página 1"
        }
      ]
    }
}}

<div class="list-certificate {{{class-root}}}">
    {{#pages}}
        <fieldset>
            <legend>{{{title}}}</legend>
            <div class="certificate-page-root mb-3">
                <div class="certificate-page {{#zoom}}certificate-page-zoom{{/zoom}}">
                    {{{pagina}}}
                </div>
            </div>
            <div>
                <a href="{{{addpage_href}}}" class="btn btn-success pt-1 pb-1">
                    {{{addpage_title}}}
                </a>
                {{#delete_href}}
                    <a href="{{{delete_href}}}" class="btn btn-danger pt-1 pb-1">
                        {{#str}}delete-page,certificatebeautiful{{/str}}
                    </a>
                {{/delete_href}}
            </div>
        </fieldset>
    {{/pages}}
</div>
