{# Template : Contact #}
{% set page_class = 'requiresSticky' %}
{% set has_recaptcha = true %}

{% extends ('layouts/' ~ page_meta.layout) %}

{% block content %}

    <div class="pageWrap">

        {% include 'navigation/breadcrumbs.twig' %}
        

        <div class="contentPageWrap">

            <div class="innerPageContent">

                <div class="contactWrap">

                    <div class="contactFormWrap">

                        {% if form_details.success is empty %}
                            {% include('includes/pages/contact/contact_form.twig') %}
                        {% else %}
                            <div class="innerText">
                                <div class="successMessage">
                                    {{ form_details.success.title|raw }}

                                    <div class="message">
                                        {{ form_details.success.message|raw }}
                                    </div>
                                </div>
                            </div> <!-- .innerText -->
                        {% endif %}


                    </div> <!-- .contactDetails -->

                    <div class="contactDetails">

                        {% if p.pagedata['Title'][0]['value'] %}
                            <h1>{{ p.pagedata['Title'][0]['value'] }}</h1>
                        {% endif %}

                        {% if p.pagedata['Content'][0]['value'] is not empty %}

                            <div class="pageContent wysiwyg">

                                {{ p.pagedata['Content'][0]['value']|raw }}

                            </div>


                        {% endif %}


                        <div class="contactInfo contactBoxes">
                            {% include 'includes/pages/contact/address_box.twig' %}
                        </div> <!-- .contactInfo -->

                        <div class="addresses contactBoxes">

                            <h6 class="contactTitle">Our location</h6>

                            <p class="addressArea">
                                {% include 'includes/pages/contact/contact_address.twig' with {
                                    hide_phone: false,
                                    hide_email: true
                                }%}
                            </p>

                        </div> <!-- .addresses contactBoxes -->

                        {% if
                            p.pagedata['Addresses'][0]['Company Registration Number']['value'] is not empty
                            or
                            p.pagedata['Addresses'][0]['VAT Number']['value'] is not empty
                            or
                            p.pagedata['Addresses'][0]['GPhC Registration Number']['value'] is not empty
                        %}
                            <div class="importantStuff contactBoxes">

                                <h6 class="contactTitle">Pharmacy Info</h6>

                                {% if p.pagedata['People'][0]['Name']['value'] is not empty %}

                                    {% for person in p.pagedata['People'] %}

                                        <p class="personWrap">

                                            {% if person['Title']['value'] is not empty %}
                                                <span class="personTitle">
                                                    {{ person['Title']['value'] }}:
                                                </span>
                                            {% endif %}

                                            {% if person['Name']['value'] is not empty %}
                                                <span class="personName">
                                                    {{ person['Name']['value'] }}
                                                </span>
                                            {% endif %}

                                        </p>

                                    {% endfor %}

                                {% endif %}

                                <div class="regNumbers">

                                    {% if p.pagedata['Addresses'][0]['Company Registration Number']['value'] is not empty %}
                                        <p class="companyReg">
                                            <strong>Company Number:</strong>
                                            {{ p.pagedata['Addresses'][0]['Company Registration Number']['value'] }}
                                        </p> <!-- .companyReg -->
                                    {% endif %}

                                    {% if p.pagedata['Addresses'][0]['VAT Number']['value'] is not empty %}
                                        <p class="companyReg">
                                            <strong>VAT Number:</strong>
                                            {{ p.pagedata['Addresses'][0]['VAT Number']['value'] }}
                                        </p> <!-- .companyReg -->
                                    {% endif %}

                                    {% if p.pagedata['Addresses'][0]['GPhC Registration Number']['value'] is not empty %}
                                        <p class="companyReg">
                                            <strong>GPhC Registration Number:</strong>
                                            {{ p.pagedata['Addresses'][0]['GPhC Registration Number']['value'] }}
                                        </p> <!-- .companyReg -->
                                    {% endif %}

                                </div> <!-- .regNumbers -->

                            </div> <!-- .importantStuff -->
                        {% endif %}


                    </div> <!-- .contactDetails -->

                </div> <!-- .contactWrap -->

            </div> <!-- .innerPageContent -->

        </div> <!-- .contentPageWrap -->
        

    </div> <!-- .pageWrap -->



{% endblock %}
