{% load i18n jazzmin %}
{% get_jazzmin_ui_tweaks as jazzmin_ui %}

{% trans "General" as general_tab %}
{% get_sections adminform inline_admin_formsets as forms %}

<div id="jazzy-carousel" class="carousel slide" data-bs-ride="false" data-bs-wrap="false" data-bs-keyboard="true" data-bs-interval="false">
    <div class="row">
        <div class="col-sm-2">
            <a href="#jazzy-carousel" role="button" data-bs-slide="prev" class="btn {{ jazzmin_ui.button_classes.primary }}"><i class="fas fa-arrow-left"></i></a>
        </div>
        <div class="col-sm-8 text-center">
            <p class="carousel-fieldset-label">
                {{ forms.0.name|default:general_tab }}
            </p>
        </div>
        <div class="col-sm-2">
            <a href="#jazzy-carousel" role="button" data-bs-slide="next" class="btn {{ jazzmin_ui.button_classes.primary }} float-end"><i class="fas fa-arrow-right"></i></a>
        </div>
    </div>
    <ol class="carousel-indicators">
        {% for fieldset in forms %}
            <li data-bs-target="#jazzy-carousel" data-bs-slide-to="{{ forloop.counter0 }}"></li>
        {% endfor %}
    </ol>
    <div class="carousel-inner">
        {% for fieldset in forms %}
            <div class="carousel-item {% if forloop.first %}active{% endif %} {{ fieldset.classes }}" data-carouselid="{{ forloop.counter0 }}" data-label="{{ fieldset.name|default:general_tab|capfirst }}" data-bs-target="#{{ fieldset.name|default:general_tab|unicode_slugify }}-tab">
                {% if fieldset.is_inline %}
                    {% include fieldset.opts.template with inline_admin_formset=fieldset %}
                {% else %}
                    {% include "admin/includes/fieldset.html" with card=True %}
                {% endif %}
            </div>
        {% endfor %}
    </div>
</div>
