{{!
    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/formgroup_create-page

    Example context (json):
    {
      "add-new-page": true,
      "add-new-page-link": "https://example.com/add-new-page",
      "mod_certificatebeautiful/list-certificate": {
        "certificates": [
          {
            "add-new-page": true,
            "add-new-page-link": "https://example.com/certificado1"
          }
        ]
      }
    }
}}

<div class="form-group row fitem">
    <div class="col-md-3 col-form-label d-flex pb-0 pr-md-0">
        <label class="d-inline word-break">
            {{#str}}pages_certificate, certificatebeautiful{{/str}}
        </label>
    </div>
    <div class="col-md-9 form-inline align-items-start felement" data-fieldtype="text">
        <div>
            {{> mod_certificatebeautiful/list-certificate }}

            <div class="d-flex">
                {{#add-new-page}}
                    <a href="{{{add-new-page-link}}}"
                       class="btn btn-info mt-4 mt-1 mb-1">{{#str}}add_new_page, certificatebeautiful{{/str}}</a>
                {{/add-new-page}}
                <a href="{{{duplicate-page-link}}}" class="btn btn-primary mt-4 mt-1 mb-1 ms-1">{{#str}}duplicate{{/str}}</a>
                <a href="{{{delete-page-link}}}" class="btn btn-danger mt-4 mt-1 mb-1 ms-3">{{#str}}delete{{/str}}</a>
            </div>
        </div>
    </div>
</div>
