{% load i18n %}

<div class="pf-c-card">
    <div class="pf-c-card__header pf-c-title pf-m-md">
        {% trans "Time-based One-Time Passwords" %}
    </div>
    <div class="pf-c-card__body">
        <p>
            {% blocktrans with state=state|yesno:"Enabled,Disabled" %}
            Status: {{ state }}
            {% endblocktrans %}
            {% if state %}
            <i class="pf-icon pf-icon-ok"></i>
            {% else %}
            <i class="pf-icon pf-icon-error-circle-o"></i>
            {% endif %}
        </p>
        <p>
            {% if not state %}
                {% if stage.configure_flow %}
                    <a href="{% url 'authentik_flows:configure' stage_uuid=stage.stage_uuid %}?next=/%23{% url 'authentik_core:user-settings' %}" class="ak-root-link pf-c-button pf-m-primary">{% trans "Enable Time-based OTP" %}</a>
                {% endif %}
            {% else %}
            <a href="{% url 'authentik_stages_authenticator_totp:disable' stage_uuid=stage.stage_uuid %}" class="ak-root-pf-c-button pf-m-danger">{% trans "Disable Time-based OTP" %}</a>
            {% endif %}
        </p>
    </div>
</div>
