{% load static %}
{# Multi-Section Markdown Documentation Block with Modal View and Mermaid Support #}

{% if documentation_config and documentation_sections_count > 0 %}

{# Load Mermaid resources once per page #}
{% if documentation_config.enable_plugins and not mermaid_loaded %}
    {{ mermaid_resources|safe }}
    {% with mermaid_loaded=True %}{% endwith %}
{% endif %}

{# Modal View - Show trigger button and modal #}
{% include 'django_admin/documentation_modal.html' %}

{% endif %}
