{% extends 'emails/layouts/notification.twig' %}

{% block before_content %}

    <tr>
        <td colspan="3" align="center">
            <h1 style="{{ paragraph_style }}{{ title_font }}">Trade Account Request</h1>
        </td>
    </tr>

    <tr>
        <td colspan="3" height="8">&nbsp;</td>
    </tr>

{% endblock %}

{% block content %}

    <tr>

        <td colspan="3" style="padding:0;" align="left">

            <table width="640" align="center" border="0" cellspacing="0" cellpadding="0"
                   style="{{ font_family }}margin:0 auto;"
            >

                <tr>

                    <td colspan="3">

                        <p style="{{ paragraph_style }}font-weight:bold;">
                            A request for a new trade account has been made and can be viewed at
                            <a href="{{ config('app.name') }}" style="{{ link_styles }}">{{ config('app.name') }}</a>
                        </p>

                        <p style="{{ paragraph_style }}">
                            {{ order.address.shipping.title ~ ' ' ~ order.address.shipping.firstname ~ ' ' ~ order.address.shipping.lastname }} <br />

                            {% if order.info['email'] is not empty %}
                                <a href="mailto:{{ order.info['email'] }}" style="{{ link_styles }}">{{ order.info['email'] }}</a><br />
                            {% endif %}

                            {% if order.address.shipping.address2 is not empty %}
                                {{ order.address.shipping.address1 }}<br />
                            {% endif %}

                            {% if order.address.shipping.address2 is not empty %}
                                {{ order.address.shipping.address2 }}<br />
                            {% endif %}

                            {% if order.address.shipping.city is not empty %}
                                {{ order.address.shipping.city }}<br />
                            {% endif %}

                            {% if order.address.shipping.country == 'US' %}
                                {{ state_list[order.address.shipping.state] }} <br />
                            {% endif %}

                            {% if countries[order.address.shipping.country] is not empty %}
                                {{ countries[order.address.shipping.country] }}<br />
                            {% endif %}

                            {% if order.address.shipping.postcode is not empty %}
                                {{ order.address.shipping.postcode }}<br />
                            {% endif %}
                        </p>

                        <p style="{{ paragraph_style }}">
                            {% if member.email is not empty %}
                                <strong>Email: </strong>{{ member.email }}<br />
                            {% endif %}

                            {% if member.contact_no is not empty %}
                                <strong>Phone: </strong>{{ member.contact_no }}<br />
                            {% endif %}

                            {% if member.company is not empty %}
                                <strong>Company: </strong>{{ member.company }}<br />
                            {% endif %}

                            {% if member.company_no is not empty %}
                                <strong>Company No: </strong>{{ member.company_no }}<br />
                            {% endif %}

                            {% if member.website is not empty %}
                                <strong>Website: </strong>{{ member.website }}<br />
                            {% endif %}

                            {% if member.number_of_stores > 0 %}
                                <strong>Number of Stores: </strong>{{ member.number_of_stores }}<br />
                            {% endif %}

                            {% if member.brands is not empty %}
                                <strong>Current Brands Stocks: </strong>{{ member.brands }}
                            {% endif %}
                        </p>

                    </td>

                </tr>

            </table>

        </td>
    </tr>

{% endblock %}


{% block after_content %}
    {% include 'emails/shop/includes/about.twig' %}
{% endblock %}
