{% load allauth %}
{% setvar variants %}
{% if "link" in attrs.tags %}
btn-link
{% else %}
{% if "prominent" in attrs.tags %}
btn-lg
{% elif "minor" in attrs.tags %}
btn-sm
{% endif %}
{% if "danger" in attrs.tags %}
btn-error
{% elif "secondary" in attrs.tags %}
btn-secondary
{% elif "warning" in attrs.tags %}
btn-warning
{% else %}
btn-primary
{% endif %}
{% endif %}
{% endsetvar %}
<{% if attrs.href %}a href="{{ attrs.href }}"{% else %}button{% endif %}
{% if attrs.form %}form="{{ attrs.form }}"{% endif %}
{% if attrs.id %}id="{{ attrs.id }}"{% endif %}
{% if attrs.name %}name="{{ attrs.name }}"{% endif %}
{% if attrs.value %}value="{{ attrs.value }}"{% endif %}
{% if attrs.type %}type="{{ attrs.type }}"{% endif %}
class="btn {{ variants }}"
>
{% if "delete" in attrs.tags %}
{% endif %}
{% if "edit" in attrs.tags %}
{% endif %}
{% slot %}{% endslot %}
{% if attrs.href %}a{% else %}button{% endif %}>