{% extends "management/base.html" %}
{% load lucide ui i18n %}

{% block heading %}{% trans "Import from RBIHF" %}{% endblock heading %}

{% block panel %}
    <div class="card w-full">
        <div class="card-body">
            <p class="text-sm text-muted">
                {% blocktrans %}Paste the URL of a team's page on the RBIHF website and pick which of
                your teams it's for. Nothing is created yet: you'll see exactly what will
                be added, changed, or removed before anything is saved.{% endblocktrans %}
            </p>

            <form method="post">
                {% csrf_token %}

                {% for error in form.non_field_errors %}
                    <div class="alert alert-error">
                        <span>{{ error }}</span>
                    </div>
                {% endfor %}

                {% for field in form %}
                    {% form_field field %}
                {% endfor %}

                <div class="card-actions justify-start pt-4">
                    <a class="btn btn-outline gap-2" href="{% url 'management:event_list' %}">{% lucide "arrow-left" size=16 %} {% trans "Cancel" %}</a>
                    <button class="btn btn-primary gap-2" type="submit">{% lucide "download" size=16 %} {% trans "Fetch and preview" %}</button>
                </div>
            </form>
        </div>
    </div>
{% endblock panel %}
