{{!
    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/>.

    Edwiser Bridge
    @package auth_edwiserbridge
    @copyright (c) 2024 WisdmLabs (https://wisdmlabs.com/)
    @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
}}
{{!
    @template auth_edwiserbridge/create_token_field

    Create token field template.

    Context variables required for this template:
    * token_dropdown_lbl - Token dropdown label.
    * tokens - Token list.
    * copy_btn_text - Copy button text.

    Example context (JSON):
    {
        "token_dropdown_lbl": "Select Token",
        "tokens": [
            {
                id: 1,
                token: "token1",
                display: "",
                selected: "selected"
            }
        ],
        "copy_btn_text": "Copy"
    }

}}
<div class="eb_copy_txt_wrap">
    <div style="width:60%;">
        <select class="eb_copy custom-select" name="eb_token" id="id_eb_token">
            <option value="">{{token_dropdown_lbl}}</option>
            {{#tokens}}
            <option data-id="{{id}}" value="{{token}}" {{display}} {{selected}}>
                {{token}}
            </option>
            {{/tokens}}
        </select>
    </div>
    <div>
        <button class="btn btn-primary eb_primary_copy_btn">{{copy_btn_text}}</button>
    </div>
</div>
