{% set _id = id ?? (block('modal_id') is defined ? block('modal_id') : ('modal-' ~ random())) %}
{% set _close = (close ?? true) is same as true %}
{% set _header = (header ?? true) is same as true %}
{% set _footer = (footer ?? true) is same as true %}
{% set _status = status ?? null %}

<div {% block modal_attributes %}{% endblock %} class="modal {% block modal_effects %}modal-blur fade{% endblock %} {% block modal_class %}{% endblock %}" id="{{ _id }}" tabindex="-1" role="dialog"{% if _header  %} aria-labelledby="{{ _id }}_label"{% endif %}>
    <div class="modal-dialog {% block modal_size %}modal-lg{% endblock %}" role="document">
        <div class="modal-content {% block modal_content_class %}{% endblock %}">
            {% block modal_before %}{% endblock %}
            {% if _status is not null %}<div class="modal-status bg-{{ _status }}"></div>{% endif %}
            {% if _header %}
                <div {% block modal_header_attributes %}{% endblock %} class="modal-header {% block modal_header_class %}{% endblock %}">
                    <h5 class="modal-title {% block modal_title_class %}{% endblock %}" id="{{ _id }}_label">{% block modal_title %}{% endblock %}</h5>
                    {% if _close %}<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ 'Close'|trans({}, 'TablerBundle') }}"></button>{% endif %}
                </div>
            {% endif %}
            <div {% block modal_body_attributes %}{% endblock %} class="modal-body {% block modal_body_class %}{% endblock %}">
                {% block modal_body %}{% endblock %}
            </div>
            {% if _footer %}
                <div {% block modal_footer_attributes %}{% endblock %} class="modal-footer {% block modal_footer_class %}{% endblock %}">
                    {% block modal_footer %}{% endblock %}
                </div>
            {% endif %}
            {% block modal_end %}{% endblock %}
        </div>
    </div>
</div>
