{% form_theme form '@CHCookieConsent/form/cookie_consent_theme.html.twig' %}

{% block script %}
    <script type="text/javascript" src="{{ asset('bundles/chcookieconsent/js/cookie_consent.js') }}"></script>
{% endblock %}

<div class="ch-cookie-consent ch-cookie-consent--{{ theme }}-theme ch-cookie-consent--{{ position }} {% if simplified %}ch-cookie-consent--simplified{% endif %}">
    {% block title %}
        <h3 class="ch-cookie-consent__title">{{ 'ch_cookie_consent.title'|trans({}, 'CHCookieConsentBundle') }}</h3>
    {% endblock %}

    {% block intro %}
        <p class="ch-cookie-consent__intro">{{ 'ch_cookie_consent.intro'|trans({}, 'CHCookieConsentBundle') }}</p>
    {% endblock %}

    {% block read_more %}
        {# <a class="ch-cookie-consent__read-more" href="{{ path('page', {pageSlug: 'politique-de-confidentialite'}) }}">{{ 'ch_cookie_consent.read_more'|trans({}, 'CHCookieConsentBundle') }}</a> #}
    {% endblock %}

    {{ form_start(form, {'attr': {'class': 'ch-cookie-consent__form'}}) }}
        <div class="ch-cookie-consent__category-group">
            {% for child in form %}
                {% if child.vars.block_prefixes[0] != 'button' %}
                    {{ form_row(child) }}
                {% endif %}
            {% endfor %}
        </div>

        <div class="ch-cookie-consent__btn-group">
            {{ form_rest(form) }}
            {% if simplified %}
                {% block toggle_details %}
                    <div class="ch-cookie-consent__toggle-details">
                        <span class="ch-cookie-consent__toggle-details-show">{{ 'ch_cookie_consent.show_details'|trans({}, 'CHCookieConsentBundle') }}</span>
                        <span class="ch-cookie-consent__toggle-details-hide">{{ 'ch_cookie_consent.hide_details'|trans({}, 'CHCookieConsentBundle') }}</span>
                    </div>
                {% endblock %}
            {% endif %}
        </div>
    {{ form_end(form) }}
</div>

