{% extends "_layouts/cp" %}
{% import "_includes/forms" as forms %}

{% block content %}
    {% if not craft.app.config.general.allowAdminChanges %}
        {% exit 403 %}
    {% endif %}
    <input type="hidden" name="action" value="{{ baseActionPath }}/save">
    {{ redirectInput(baseCpPath) }}

    {%- set warning -%}
        ** WARNING: ** If this value is changed, you must recreate "My Provider" and exchange the metadata or values with the other provider (IdP or SP).
    {%- endset -%}

    <div class="readable">
        <h2>Settings</h2>
    </div>

    {{ forms.autosuggestField({
        label: "Default Entity ID"|t(plugin.handle ),
        name:'entityId',
        id:'entityId',
        instructions: "The unique id for the site. " ~ warning|t('app'),
        suggestEnvVars: true,
        suggestAliases: true,
        value: settings.entityIdRaw,
    }) }}

    {{ forms.autosuggestField({
        label: "SSO Endpoint Prefix"|t(plugin.handle ),
        name:'endpointPrefix',
        id:'endpointPrefix',
        instructions: "The endpoint prefix. " ~ warning|t('app'),
        suggestEnvVars: true,
        value: settings.endpointPrefix,
    }) }}
{% endblock %}
