{% extends 'user/layout.html.twig' %}

{% block profile_content %}

    <div class="card">
        <div class="card-header">
            {% block form_header %}
            <ul class="nav nav-pills card-header-pills" data-bs-toggle="tabs">
                {% import "user/actions.html.twig" as actions %}
                {% set event = actions(app.user, 'user_forms', tab, {'user': user}) %}
                {% for name, settings in event.actions %}
                    <li class="nav-item" role="presentation">
                        <a href="{{ settings.url }}" class="nav-link{% if tab == name %} active{% endif %}" role="tab">{{ settings.title|trans({}, settings.translation_domain ?? 'messages') }}</a>
                    </li>
                {% endfor %}
            </ul>
            {% endblock %}
        </div>
        {% block form_body %}
        {{ form_start(form) }}
        <div class="card-body {% block form_body_class %}{% endblock %}">
            {% block form_pre_content %}{% endblock %}
            {% block form_content %}
                {{ form_widget(form) }}
            {% endblock %}
            {% block form_post_content %}{% endblock %}
        </div>
        <div class="card-footer">
            <input type="submit" value="{{ 'action.save'|trans }}" class="btn btn-primary" />
        </div>
        {{ form_end(form) }}
        {% endblock %}
    </div>

{% endblock %}
