{% import 'macros/forms.html' as forms %}

{% extends "auth/layout.html" %}

{% block head_title %}{{ _('Consent') }}{% endblock %}

{% block title %}{{ _('%(name)s wants to access your account', name=client.name) }}{% endblock %}

{% block auth_form %}
  <form method="POST" action="{{ tenant.url_path_for(request, 'auth:consent') }}">
    <div class="space-y-4">
      <div className="text-sm">{{ _('This will allow %(name)s to:', name=client.name) }}</div>
      {% for scope in scopes %}
        <div class="bg-white shadow-md rounded-sm border border-slate-200">
          <div class="flex flex-col p-5">
            {{ scope }}
          </div>
        </div>
      {% endfor %}
    </div>
    <div class="flex items-center justify-between mt-6">
      {{ form.deny(class="btn border-slate-200 hover:border-slate-300 text-slate-600") }}
      {{ form.allow(class="btn bg-primary hover:bg-primary-hover text-white") }}
      {{ forms.form_csrf_token(form) }}
    </div>
  </form>
{% endblock %}
