{% extends "mfa/recovery_codes/base.html" %}
{% load i18n %}
{% load allauth %}
{% block content %}
    {% element h1 %}
        {% translate "Recovery Codes" %}
    {% endelement %}
    {% element p %}
        {% blocktranslate %}You are about to generate a new set of recovery codes for your account.{% endblocktranslate %}
        {% if unused_code_count %}
            {% blocktranslate %}This action will invalidate your existing codes.{% endblocktranslate %}
        {% endif %}
        {% blocktranslate %}Are you sure?{% endblocktranslate %}
    {% endelement %}
    {% url 'mfa_generate_recovery_codes' as action_url %}
    {% element form method="post" action=action_url no_visible_fields=True %}
        {% slot body %}
            {% csrf_token %}
            {{ form.as_p }}
        {% endslot %}
        {% slot actions %}
            {% setvar tags %}
                {% if unused_code_count %}
                    danger
                {% else %}
                {% endif %}
            {% endsetvar %}
            {% element button type="submit" tags=tags %}
                {% trans "Generate" %}
            {% endelement %}
        {% endslot %}
    {% endelement %}
{% endblock content %}
