{#
 # This file is part of SolidInvoice package.
 #
 # (c) Pierre du Plessis <open-source@solidworx.co>
 #
 # This source file is subject to the MIT license that is bundled
 # with this source code in the file LICENSE.
 #}

{% extends "@SolidInvoiceCore/Layout/Email/notification.html.twig" %}

{%- block title -%}
    {{ 'client.create.heading'|trans({}, 'email') }}
{%- endblock -%}

{%- block content -%}

    {% apply inky_to_html %}
        <row>
            <columns large="6"><strong>{{ 'client.create.details.name'|trans({}, 'email') }}</strong></columns>
            <columns large="6" class="text-right">{{ client.name }}</columns>
        </row>
        {% if client.website is not empty %}
            <row>
                <columns large="6"><strong>{{ 'client.create.details.website'|trans({}, 'email') }}</strong></columns>
                <columns large="6" class="text-right">
                    <a href="{{ client.website }}" rel="external" target="_blank">
                        {{ client.website }}
                    </a>
                </columns>
            </row>
        {% endif %}

        <h4>{{ 'client.create.contacts.heading'|trans({}, 'email') }}</h4>

        {% for contact in client.contacts %}
            <row>
                <columns large="6"><strong>{{ 'client.create.contacts.name'|trans({}, 'email') }}</strong></columns>
                <columns large="6" class="text-right">{{ contact.firstName }} {{ contact.lastName }}</columns>
            </row>
            <row>
                <columns large="6"><strong>{{ 'client.contact.details.email'|trans }}</strong></columns>
                <columns large="6" class="text-right">{{ contact.email }}</columns>
            </row>
            <br />
        {% endfor %}

        <center data-parsed="">
            <table class="button success float-center">
                <tr>
                    <td>
                        <table>
                            <tr>
                                <td>
                                    <a href="{{ url('_clients_view', {'id' : client.id}) }}">View Client</a>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </center>
    {% endapply %}
{%- endblock -%}
