{% extends "base.html" %}{% load static %}
{% block title %} {{ title }}{% endblock %}
{% block page_heading %}TeamSnap Info{% endblock %}
{% block content %}
    <h6>Currently Logged in as</h6>
    <p><b>BenchCoach: </b>{{ user }} ({{ user.email }})</p>
    <p><b>TeamSnap: </b>{{ teamsnap_user.email }}</p>
    <p><b>TeamSnap Managed Team: </b>{{ teamsnap_team.name }}</p>

    {% include 'messages.html' %}

    <a class="btn btn-primary" href="{% url 'import' %}" role="button">
        <i class="bi bi-arrow-clockwise"></i><i class="bi bi-asterisk"></i> Import
                    </a>

    <table class="table">
        <ul class="list-group">
            {% for obj_name, obj_data in teamsnap_objects.items %}
                <tr class="">
                    <th>{{ obj_name }}</th>
                        <td>{{ obj_data.object_count }}</td>
                    <th>{{ obj_data.counterpart.name }} </th>
                    <td>{{ obj_data.counterpart.object_count }}</td>

                    <td>
                        {% include 'teamsnap/update-button.html' with object_name=obj_data.counterpart.name object_id='' next=request.path %}
                    </td>
                </tr>
            {% endfor %}
        </ul>
    </table>


{% endblock %}