<div id="{{ component.component_id }}-submit-button"
     class="text-center pt-2">
    {% if component.form_errors %}
        <div>
            {% for error in component.form_errors %}
                {% alert message=error theme="danger" %}
            {% endfor %}
        </div>
    {% endif %}
    {% if component.form_mode == "update_many" %}
        {% if not component.is_update_many_confirmed %}
            <div>There is no undo button! Are you sure you want to update all these entries?</div>
            {% with target_id="#"|add:component.component_id|add:"-submit-button" %}
                {% htmx_button method_name="confirm_update_many" include="#select_search_results" target=target_id %}
            {% endwith %}
        {% else %}
            <div>
                This will update <b>{{ component.entry_ids_to_update|length }}</b> entries.
            </div>
            {% htmx_button method_name="submit_form" label="Save to database" icon="floppy2" %}
        {% endif %}
    {% elif component.form_mode == "search" %}
        {% htmx_button method_name="submit_form" label="Search" icon="search" %}
    {% else %}
        {% htmx_button method_name="submit_form" label="Save to database" icon="floppy2" %}
    {% endif %}
</div>
