{#
Copyright 2022 The Matrix.org Foundation C.I.C.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
#}

{% extends "base.html" %}

{% block content %}
  <section class="flex items-center justify-center flex-1">
    <div class="w-96 my-2 mx-8">
      <div class="grid grid-cols-1 gap-6">
        <h1 class="text-xl font-semibold">{{ _("mas.policy_violation.heading") }}</h1>
        <p>{{ _("mas.policy_violation.description") }}</p>
        <div class="rounded-lg bg-grey-25 dark:bg-grey-450 p-2 flex items-center">
          <div class="bg-white rounded w-16 h-16 overflow-hidden mx-auto">
            {% if client.logo_uri %}
              <img referrerpolicy="no-referrer" class="w-16 h-16" src="{{ client.logo_uri }}" />
            {% endif %}
          </div>
          <h1 class="text-lg text-center font-medium flex-1"><a target="_blank" href="{{ client.client_uri }}" class="cpd-link" data-kind="primary">{{ client.client_name | default(client.client_id) }}</a></h1>
        </div>

        <div class="rounded-lg bg-grey-25 dark:bg-grey-450 p-2 flex items-center">
          <div class="text-center flex-1">
            {{ _("mas.policy_violation.logged_as", username=current_session.user.username) }}
          </div>

          {{ logout.button(text=_("action.sign_out"), csrf_token=csrf_token, post_logout_action=action) }}
        </div>

        {{ back_to_client.link(
          text=_("action.cancel"),
          kind="destructive",
          uri=grant.redirect_uri,
          mode=grant.response_mode,
          params=dict(error="access_denied", state=grant.state)
        ) }}
      </div>
    </div>
  </section>
{% endblock content %}

