{% load i18n %}

<div {% if not is_popup %}id="submit-row"{% endif %} class="relative lg:sticky lg:bottom-0 z-40">
    <div class="backdrop-blur-xs bg-white/80 rounded-b-default pb-4 px-4 dark:bg-base-900/80 {% if not is_popup %}lg:border-t lg:border-base-200 relative lg:scrollable-top lg:py-0 dark:border-base-800{% endif %}">
        <div class="flex flex-col-reverse gap-3 items-center mx-auto lg:flex-row-reverse container lg:h-[64px]">
            {% if not revert_disabled %}
                <button type="submit" form="{{ opts.model_name }}_form" class="bg-primary-600 block border border-transparent cursor-pointer font-medium px-3 py-2 rounded-default text-sm text-white w-full lg:w-auto"  name="_save" {{ onclick_attrib }}>
                    {% trans 'Revert' %}
                </button>
            {% endif %}

            {% if change_history %}
                <button type="submit" form="{{ opts.model_name }}_form" class="bg-primary-600 block border border-transparent cursor-pointer font-medium px-3 py-2 rounded-default text-sm text-white w-full lg:w-auto"  name="_change_history" {{ onclick_attrib }}>
                    {% trans 'Change History' %}
                </button>
            {% endif %}

            <a href="{{ history_url }}" class="border border-base-200 font-medium mr-auto px-3 py-2 rounded-default text-sm text-base-500 text-center transition-all w-full hover:bg-base-50 lg:block lg:w-auto dark:border-base-700 dark:text-font-default-dark dark:hover:text-base-200 dark:hover:bg-base-900">
                {% trans 'Close' %}
            </a>
        </div>
    </div>
</div>
