{% extends "@ChillMain/layout.html.twig" %}

{% block sublayout_content %}
    <div class="row admin">
        <div class="col-md-9 my-5">

            {# Flash messages ! #}
            {% if app.session.flashbag.keys()|length > 0 %}
            <div class="row justify-content-center mb-5">

                {% for flashMessage in app.session.flashbag.get('success') %}
                    <div class="col-8 alert alert-success flash_message">
                        <span>{{ flashMessage|raw }}</span>
                    </div>
                {% endfor %}

                {% for flashMessage in app.session.flashbag.get('error') %}
                    <div class="col-8 alert alert-danger flash_message">
                        <span>{{ flashMessage|raw }}</span>
                    </div>
                {% endfor %}

                {% for flashMessage in app.session.flashbag.get('notice') %}
                    <div class="col-8 alert alert-warning flash_message">
                        <span>{{ flashMessage|raw }}</span>
                    </div>
                {% endfor %}

            </div>
            {% endif %}
    
            <div class="row justify-content-center">
                <div class="col-md-10 col-xxl">
                    {% block admin_content %}
                        <!-- block admin content empty -->
                    {% endblock %}
                </div>
            </div>
            
        </div>
        <div class="col-md-3">
            {% block vertical_menu_content %}
                {{ chill_menu('admin_section', {
                    'layout': '@ChillMain/Admin/menu_admin_section.html.twig',
                }) }}
            {% endblock %}
        </div>
    </div>
{% endblock %}
