{% extends '@SyliusShop/layout.html.twig' %}

{% form_theme form '@SyliusShop/Form/theme.html.twig' %}
{% import '@SyliusUi/Macro/headers.html.twig' as headers %}

{% block content %}
    <section class="container contact-container">
        <div class="row justify-content-md-center">
            <div class="col-lg-8">
                <header>
                    {{ headers.shop('sylius.ui.contact_us'|trans,'paper-plane', 'sylius.ui.use_the_contact_form_below_to_send_us_a_message'|trans) }}
                </header>

                <div class="contact-wrapper">
                    {{ sylius_template_event('sylius.shop.contact.request.after_content_header') }}

                    <div class="contact-form">
                        {{ form_start(form, {'action': path('sylius_shop_contact_request'), 'attr': {'class': 'ui large form recaptcha-form'}}) }}

                        {% if form.subject is defined %}
                            {{ form_row(form.subject) }}
                        {% endif %}

                        {{ form_row(form.name) }}
                        {{ form_row(form.email, sylius_test_form_attribute('contact-email')) }}
                        {{ form_row(form.phone) }}
                        {{ form_row(form.message, sylius_test_form_attribute('contact-message')) }}
                        {{ form_row(form.captcha, { label: false }) }}

                        {{ sylius_template_event('sylius.shop.contact.request.form', {'form': form}) }}

                        {{ form_row(form._token) }}
                        <div class="form-btn-wrapper">
                            <button type="submit" id="recaptcha-submit"
                                    class="btn btn-primary" {{ sylius_test_html_attribute('send-button') }}>{{ 'sylius.ui.send'|trans }}
                                &#155;
                            </button>
                        </div>
                        {{ form_end(form, {'render_rest': false}) }}
                    </div>
                </div>
            </div>
        </div>
    </section>
{% endblock %}
