{# The OIDC logout template.

Used during OIDC RP-initiated logout, when an user confirmation is needed.

:param form: The logout form.
:type form: :class:`~canaille.oidc.endpoints.forms.LogoutForm`.
:param client: The client requesting the logout.
:type client: :class:`~canaille.oidc.basemodels.Client`
#}
{% extends theme('base.html') %}
{% import 'macro/form.html' as fui %}

{% block content %}
    <div class="ui segment">
        <div class="ui center aligned">
            <h2 class="ui center aligned icon header">
                <i class="sign out icon"></i>
                <div class="content">{% trans %}Log out{% endtrans %}</div>
                <div class="sub header">{% trans %}Do you want to log out?{% endtrans %}</div>
            </h2>
            <div class="ui message">
                <p>
                    {{ _("You are currently logged in as %(username)s.", username=user.identifier) }}
                    {% if client %}
                        {{ _("The application %(client_name)s wants to disconnect your account.", client_name=client.client_name) }}
                    {% endif %}
                </p>
            </div>
        </div>
        <br>

        <div class="ui center aligned container">
            {% call fui.render_form(form) %}
                <div class="ui stackable buttons">
                    <button name="answer" type="submit" class="ui button" value="stay" id="stay">
                        {% trans %}Stay logged{% endtrans %}
                    </button>
                    <button name="answer" type="submit" class="ui primary button" value="logout" id="logout">
                        {% trans %}Logout{% endtrans %}
                    </button>
                </div>
            {% endcall %}
        </div>
    </div>
{% endblock %}
