{% sw_extends '@Storefront/storefront/layout/cookie/cookie-permission.html.twig' %}

{% block layout_cookie_permission_inner %}
    {% set acceptAllCookies = config('core.basicInformation.acceptAllCookies') %}
    <div
            class="modal cookie-permission-container"
            data-bs-backdrop="static"
            data-cookie-permission="true">
        <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
            <div class="modal-content">

                {% block layout_cookie_permission_inner_header %}
                    <div class="modal-header">
                        <div class="h4 modal-title">{{ "cookie.messageHeader"|trans }}</div>
                    </div>
                {% endblock %}


                {% block layout_cookie_permission_inner_content %}
                    <div class="modal-body py-0">
                        {{ "cookie.messageText1"|trans({
                            '%url%': path('frontend.cms.page', { id: config('core.basicInformation.privacyPage') })
                        })|raw }}
                    </div>
                {% endblock %}

                {% block layout_cookie_permission_inner_button %}
                    <div class="modal-footer">
                        <div class="cookie-permission-actions d-grid gap-2 w-100">
                            {% if acceptAllCookies %}
                                {% block layout_cookie_permission_inner_button_accept_all %}
                                    <div class="js-cookie-accept-all-button">
                                        <button
                                                type="submit"
                                                class="btn btn-primary w-100">
                                            {{ "cookie.acceptAll"|trans|sw_sanitize }}
                                        </button>
                                    </div>
                                {% endblock %}
                            {% endif %}

                            {% block layout_cookie_permission_inner_button_deny %}
                                <div class="cookie-permission-button js-cookie-permission-button">
                                    <button
                                            type="submit"
                                            class="btn btn-primary w-100">
                                        {{ "cookie.deny"|trans|sw_sanitize }}
                                    </button>
                                </div>
                            {% endblock %}

                            {% block layout_cookie_permission_inner_button_configuration %}
                                <div class="js-cookie-configuration-button">
                                    <button
                                            type="submit"
                                            class="btn btn-primary w-100">
                                        {{ "cookie.configure"|trans|sw_sanitize }}
                                    </button>
                                </div>
                            {% endblock %}

                        </div>
                    </div>
                {% endblock %}
            </div>
        </div>
    </div>
{% endblock %}
