{% extends 'emails/base.html.twig' %}

{% block preheader %}
    {{ text.preheader }} {{ purchase_date | date('d/m/y') }}
{% endblock preheader %}

{% block body %}
    <p>{{ text.body }}</p>
    <table class="purchase" width="100%" cellpadding="0" cellspacing="0" role="presentation">
        {% if campaign_name %}
            <tr>
                <td><h3>{{ text.campaign }}: {{ campaign_name }}</h3></td>
            </tr>
        {% endif %}
        <tr>
            <td>
                <h3>{{ text.order_id }}: {{ receipt_id }}</h3></td>
            <td>
                <h3 class="align-right">{{ text.date }}: {{ date | date('d/m/y') }}</h3></td>
        </tr>
        <tr>
            <td colspan="2">
                <table class="purchase_content" width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <th class="purchase_heading" align="left">
                            <p class="f-fallback">{{ text.description }}</p>
                        </th>
                        <th class="purchase_heading" align="right">
                            <p class="f-fallback">{{ text.amount }}</p>
                        </th>
                    </tr>
                    <tr>
                        <td width="80%" class="purchase_item"><span class="f-fallback">{{ description }}</span></td>
                        <td class="align-right purchase_item" width="20%"><span
                                    class="f-fallback">{{ amount }}</span></td>
                    </tr>
                    <tr>
                        <td width="80%" class="purchase_footer" valign="middle">
                            <p class="f-fallback purchase_total purchase_total--label">{{ text.total }}</p>
                        </td>
                        <td width="20%" class="purchase_footer" valign="middle">
                            <p class="f-fallback purchase_total">{{ amount }}</p>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <p>{{ text.thanks }},
        <br>{{ get_bloginfo('name') }}</p>
    <!-- Cancel subscription -->
    {% if cancel_url %}
        <table class="body-sub" role="presentation">
            <tr>
                <td>
                    <p class="f-fallback sub">{{ text.cancel_sub }} <a
                                href="{{ cancel_url }}">{{ text.cancel_sub_button }}</a>.</p>
                </td>
            </tr>
        </table>
    {% endif %}
{% endblock body %}