{% extends 'base.html.twig' %}

{% block body_attr %}{% if app.user %} data-controller="inactivity"{% endif %}{% endblock %}

{% block body %}
    {{ include('partials/_navbar.html.twig') }}
    <main class="flex-1">
        {% for type, messages in app.flashes %}
            {% for message in messages %}
                <div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 pt-6">
                    <div class="px-4 py-3 rounded-xl text-sm font-medium {{ type == 'success' ? 'bg-green-50 text-green-700 border border-green-200' : 'bg-red-50 text-red-700 border border-red-200' }}">
                        {{ message }}
                    </div>
                </div>
            {% endfor %}
        {% endfor %}
        {% block content %}{% endblock %}
    </main>
    {{ include('partials/_footer.html.twig') }}
{% endblock %}
