{% extends "Global/layout.html.twig" %}

{% set pagetitle = 'Contact us'|trans %}

{% block title %}{{pagetitle}}{% endblock %}

{% block content %}

    {% set navigation = [{"current": (pagetitle)}] %}
    {% include "Global/navigation.html.twig" with navigation %}

    <section class="section-content padding-y bg-white">
        <div class="{{ services.getSetting("app_layout") }}">
            <div class="row">
                <div class="col-sm-12">
                    <div class="card box">
                        <div class="card-body">
                            <h1 class="text-center mb-5">{{ "FAQ"|trans }}</h1>
                            {% for featuredHelpCenterArticle in services.getHelpCenterArticles({"featured" : true, "limit": 5}).getQuery().getResult() %}
                                <p class="text-center"><a href="{{ path('help_center_article', {slug: featuredHelpCenterArticle.slug}) }}">{{ featuredHelpCenterArticle.title }}</a></p>
                                {% endfor %}
                            <h4 class="text-center mt-5"><a href="{{ path('help_center') }}"><i class="fas fa-life-ring"></i> {{ "Help center"|trans }}</a></h4>

                            {% if services.getSetting("contact_email") != "" or services.getSetting("contact_phone") != "" or services.getSetting("contact_fax") != "" or services.getSetting("contact_address") != "" %}

                                <hr class="mt-5 mb-5">

                                <h1 class="text-center mb-5">{{ "Contact information"|trans }}</h1>

                                <div class="row">

                                    {% if services.getSetting("contact_email") != "" %}

                                        <div class="col-12 col-lg-4 card border-0 card-body text-center shadow-none">
                                            <figure class="itemside">
                                                <div class="aside">
                                                    <span class="icon-wrap icon-md round bg-info">
                                                        <i class="fas fa-envelope-open-text white"></i>
                                                    </span>
                                                </div>
                                                <figcaption class="text-wrap align-self-center">
                                                    <h6 class="title">{{ services.getSetting("contact_email") }}</h6>
                                                </figcaption>
                                            </figure>
                                        </div>

                                    {% endif %}

                                    {% if services.getSetting("contact_phone") != "" %}

                                        <div class="col-12 col-lg-4 card border-0 card-body text-center shadow-none">
                                            <figure class="itemside">
                                                <div class="aside">
                                                    <span class="icon-wrap icon-md round bg-info">
                                                        <i class="fas fa-phone white"></i>
                                                    </span>
                                                </div>
                                                <figcaption class="text-wrap align-self-center">
                                                    <h6 class="title">{{ services.getSetting("contact_phone") }}</h6>
                                                </figcaption>
                                            </figure>
                                        </div>

                                    {% endif %}

                                    {% if services.getSetting("contact_fax") != "" %}

                                        <div class="col-12 col-lg-4 card border-0 card-body text-center shadow-none">
                                            <figure class="itemside">
                                                <div class="aside">
                                                    <span class="icon-wrap icon-md round bg-info">
                                                        <i class="fas fa-fax white"></i>
                                                    </span>
                                                </div>
                                                <figcaption class="text-wrap align-self-center">
                                                    <h6 class="title">{{ services.getSetting("contact_fax") }}</h6>
                                                </figcaption>
                                            </figure>
                                        </div>

                                    {% endif %}

                                    {% if services.getSetting("contact_address") != "" %}

                                        <div class="col card border-0 card-body text-center shadow-none">
                                            <figure class="itemside">
                                                <div class="aside">
                                                    <span class="icon-wrap icon-md round bg-info">
                                                        <i class="fas fa-map-marker white"></i>
                                                    </span>
                                                </div>
                                                <figcaption class="text-wrap align-self-center">
                                                    <h6 class="title">{{ services.getSetting("contact_address") }}</h6>
                                                </figcaption>
                                            </figure>
                                        </div>

                                    {% endif %}

                                </div>

                                {% if services.getSetting("contact_email") %}

                                    <hr class="mt-5 mb-5">

                                    <h1 class="text-center mb-5">{{ "Send us an email"|trans }}</h1>

                                    {{ form_start(form, {'attr': {'novalidate': 'novalidate', 'class': 'col-12 col-lg-8 mx-auto'}}) }}
                                    {{ form_widget(form) }}
                                    {{ form_end(form) }}

                                {% endif %}
                            {% endif %}

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

{% endblock %}