{% extends 'emails/base.txt' %}

{% block subject -%}
    {% trans count=seats_left, name=group.name -%}
        Your group "{{ name }}" still needs {{ count }} more member
    {%- pluralize count -%}
        Your group "{{ name }}" still needs {{ count }} more members
    {%- endtrans %}
{%- endblock %}

{% block header_recipient -%}
    {% trans name=registration.first_name %}Dear {{ name }}{% endtrans %}
{%- endblock %}

{% block body -%}
{% set chosen = group.chosen_plan -%}
{% trans name=group.name, title=event.title, count=group.member_count, target=group.target_size, label=chosen.label if chosen else '' -%}
Your group "{{ name }}" for {{ title }} has {{ count }} of the {{ target }} members its "{{ label }}" rate requires, so it is not confirmed yet.
{%- endtrans %}

{% trans target=group.target_size, deadline=deadline | format_datetime(timezone=event.tzinfo), tz=event.timezone -%}
If it has not reached {{ target }} members by {{ deadline }} ({{ tz }}), it will be repriced to the rate it does qualify for at that point. That applies to everyone in the group, whether or not they have already paid.
{%- endtrans %}

{% if difference > 0 %}
{% if fallback_plan %}
{% trans label=fallback_plan.label, current=format_currency(current_price, registration.currency), projected=format_currency(projected_price, registration.currency), difference=format_currency(difference, registration.currency) -%}
At its current size the group would qualify for the "{{ label }}" rate, and the amount payable for your registration would rise from {{ current }} to {{ projected }} -- a difference of {{ difference }}.
{%- endtrans %}
{% else %}
{% trans current=format_currency(current_price, registration.currency), projected=format_currency(projected_price, registration.currency), difference=format_currency(difference, registration.currency) -%}
At its current size the group would not qualify for a group rate, so the standard rate would apply and the amount payable for your registration would rise from {{ current }} to {{ projected }} -- a difference of {{ difference }}.
{%- endtrans %}
{% endif %}
{% if paid_amount > 0 %}

{% trans paid=format_currency(paid_amount, registration.currency), balance=format_currency(projected_balance, registration.currency) -%}
You have already paid {{ paid }}, so you would then owe {{ balance }} and be asked to settle it. Registrations with an unpaid balance may be cancelled, and entry to the event may be refused.
{%- endtrans %}
{% endif %}
{% else %}
{% trans -%}
At its current size the amount payable for your registration would not change.
{%- endtrans %}
{% endif %}

{% trans code=group.formatted_code, url=url_for_plugin('group_registration.join_link', regform, join_uuid=group.join_uuid, _external=true) -%}
There is still time. Share the group code {{ code }} or this link with anyone who still means to register -- the group confirms itself the moment the last seat is filled:
{{ url }}
{%- endtrans %}

{% trans url=url_for('event_registration.display_regform', registration.locator.registrant, _external=true) -%}
You can see your group and its members on your registration page: {{ url }}
{%- endtrans %}
{%- endblock %}
