{% macro license_form() %}

{{ _('subscription.license_lead') }}

{% endmacro %}

{{ _('subscription.title') }}

{{ _('subscription.state.pending' if activation_pending else 'subscription.state.' + state) }}
{% if error %}{% endif %} {% if activation_pending %}
{{ _('subscription.pending_title') }}

{{ _('subscription.pending_hint') }}

{% if pending_device_name %}

{{ _('subscription.current_device') }}: {{ pending_device_name }}

{% endif %}
{% endif %} {% if state == 'invalid' and not error %}{% endif %} {% if state == 'unavailable' and not error %}{% endif %} {% if summary and not activation_pending %}
{{ _('subscription.email') }}
{{ email or '—' }}
{{ _('subscription.plan') }}
{% if state in ['active', 'unavailable'] %}{% endif %}{{ plan_name or '—' }}
{{ _('subscription.activated_at') }}
{{ activated_at or '—' }}
{{ _('subscription.last_validated') }}
{{ last_validated_at or '—' }}
{{ _('subscription.current_device') }}
{{ device_name or '—' }}
{{ _('subscription.license') }}
{% if state == 'active' %}{% endif %}{% if key_last4 %}•••• {{ key_last4 }}{% else %}—{% endif %}
{% endif %} {% if not activation_pending and state in ['inactive', 'invalid'] %}{{ license_form() }}{% endif %} {% if activation_pending or state in ['inactive', 'invalid'] or (state == 'unavailable' and not summary) %}
{% if activation_pending %}
{{ _('subscription.recover') }} {% elif state == 'invalid' %} {{ _('subscription.recover') }} {% elif state == 'unavailable' %}
{{ _('subscription.recover') }} {% else %} {{ _('subscription.recover') }} {% endif %}
{% endif %}