<include href="templates/parts/headerAdmin.html" />
<div id="wrap">
    <include href="templates/parts/leftMenu.html" />
    <div class="main">
        <include href="templates/parts/popups/enrichAllPopup.html" />

        <include href="templates/parts/forms/globalSearchForm.html" />
        <include href="templates/parts/systemNotification.html" />
        <include href="templates/parts/welcomeMessage.html" />
        <include href="templates/parts/notification.html" />

        <div class="columns">
            <div class="column settings-page">
                <div class="card events-card">
                    <header class="card-header">
                        <div class="card-header-title">{{ @AdminApi_http_endpoint }}<p class="tooltip-info tooltip"title="{{ @AdminApi_table_title_tooltip }}"><include href="images/icons/information.svg" alt='' /></p>
                        </div>
                    </header>

                    <div class="card-content">
                        <div class="card-table">
                            <div class="content">
                                <include href="templates/parts/tables/tokens.html" />

                                <hr>

                                <p>{{ @AdminApi_http_endpoint_tooltip.title }}</p>
                                <ol>
                                    <repeat group="{{ @AdminApi_http_endpoint_tooltip.items }}" value="{{ @item }}">
                                        <li>{{ @item }}</li>
                                    </repeat>
                                </ol>
                                <hr>
                                <div class="field">
                                    <label class="label">{{ @AdminApi_server_language }}</label>
                                    <div class="control">
                                        <div class="selector">
                                            <select class="input" name="version">
                                                <option value="php" selected>PHP</option>
                                                <option value="python">Python</option>
                                                <option value="nodejs">Node.js</option>
                                                <option value="ruby">Ruby</option>
                                                <option value="curl">cURL</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>

                                <repeat group="{{ @API_KEYS }}" value="{{ @API_KEY }}">
                                    <div id="php">
                                        <textarea class="code-snippet" rows="93" cols="84"
                                            readonly><include href="templates/snippets/php.html" with="apiKey={{ @API_KEY.key }}, apiUrl={{ @API_URL }}" /></textarea>
                                    </div>

                                    <div id="python" class="is-hidden">
                                        <textarea class="code-snippet" rows="72" cols="84"
                                            readonly><include href="templates/snippets/python.html" with="apiKey={{ @API_KEY.key }}, apiUrl={{ @API_URL }}" /></textarea>
                                    </div>

                                    <div id="nodejs" class="is-hidden">
                                        <textarea class="code-snippet" rows="70" cols="84"
                                            readonly><include href="templates/snippets/nodejs.html" with="apiKey={{ @API_KEY.key }}, apiUrl={{ @API_URL }}" /></textarea>
                                    </div>

                                    <div id="ruby" class="is-hidden">
                                        <textarea class="code-snippet" rows="74" cols="84"
                                            readonly><include href="templates/snippets/ruby.html" with="apiKey={{ @API_KEY.key }}, apiUrl={{ @API_URL }}" /></textarea>
                                    </div>
                                    <div id="curl" class="is-hidden">
                                        <textarea class="code-snippet" rows="22" cols="84"
                                            readonly><include href="templates/snippets/curl.html" with="apiKey={{ @API_KEY.key }}, apiUrl={{ @API_URL }}" /></textarea>
                                    </div>
                                </repeat>
                            </div>
                        </div>
                    </div>
                </div>

                <check if="{{ @IS_OWNER }}">
                    <repeat group="{{ @API_KEYS }}" value="{{ @API_KEY }}">
                        <div class="card events-card">
                            <header class="card-header">
                                <a name="subscription"></a>
                                <div class="card-header-title">{{ @AdminApi_form_title }}<p class="tooltip-info tooltip" title="{{ @AdminApi_form_title_tooltip }}"><include href="images/icons/information.svg" alt='' /></p></div>
                            </header>
                            <include href="templates/parts/forms/updateApiUsageForm.html" />
                        </div>
                    </repeat>

                    <include href="templates/parts/tables/usageStats.html" />

                    <include href="templates/parts/forms/enrichAllForm.html" />
                </check>
            </div>
        </div>
    </div>
</div>
<include href="templates/parts/footerAdmin.html" />
