{% load i18n %}
{% load ibanformat %}
{% load rich_text %}

{% if details or code %}
    <p>{% blocktrans trimmed %}
        After completing your purchase, we will ask you to transfer the money to the following
        bank account, using a personal reference code:
    {% endblocktrans %}</p>

    {% if not code %}<div class="user-select-none" data-toggle="tooltip" title="{% trans "Please do not yet start a payment. We'll assign you a personal reference code after you completed the order." %}">{% endif %}
    <dl class="dl-horizontal">
        {% if code %}
            <dt>{% trans "Reference code (important):" %} </dt><dd><strong>{{ code }}</strong></dd>
        {% endif %}
        {% if settings.bank_details_type == "sepa" %}
            <dt>{% trans "Account holder" %}: </dt><dd>{{ settings.bank_details_sepa_name }}</dd>
            <dt>{% trans "IBAN" %}: </dt><dd>{{ settings.bank_details_sepa_iban|ibanformat }}</dd>
            <dt>{% trans "BIC" %}: </dt><dd>{{ settings.bank_details_sepa_bic }}</dd>
            <dt>{% trans "Bank" %}: </dt><dd>{{ settings.bank_details_sepa_bank }}</dd>
        {% endif %}
    </dl>

    {{ details | rich_text }}
    {% if not code %}</div>{% endif %}

    {% if not code and order %}
        <p>
            <strong>
                {% trans "We will assign you a personal reference code in the next step." %}
            </strong>
        </p>
    {% elif not code %}
        <p>
            <strong>
                {% trans "We will assign you a personal reference code to use after you completed the order." %}
            </strong>
        </p>
    {% endif %}
{% else %}
    <p>{% blocktrans trimmed %}
        After completing your purchase, we will ask you to transfer the money to our bank account, using a personal
        reference code.
    {% endblocktrans %}</p>
{% endif %}
