{% load fsm_tags %}

{# This partial is loaded via HTMX into #park-status-section. It must include the container #}
{# element with the same id and hx-* attributes to preserve targeting for subsequent transitions. #}
<div id="park-status-section"
     data-park-status-actions
     hx-get="{% url 'parks:park_status_actions' park.slug %}"
     hx-trigger="park-status-changed from:body"
     hx-swap="outerHTML">
{% if user.is_authenticated and perms.parks.change_park %}
<div class="mb-6 p-4 bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg">
    <h3 class="text-sm font-semibold text-blue-900 dark:text-blue-100 mb-3">
        <i class="fas fa-cog mr-2"></i>Status Management
    </h3>

    {% include "htmx/status_with_actions.html" with object=park user=user target_id="park-status-section" %}
</div>
{% endif %}
</div>
