<!DOCTYPE html>
{% set tg_project_dict = tgproject_handler.get_tg_project(current_tg_project_id) %}
{% if tg_project_dict %}
<div class="mb-4">
    <h5 class="mb-3 border-bottom pb-2">Selected TextGrid Project</h5>
    <div class="d-flex align-items-stretch w-100">
        <div class="flex-grow-1 d-flex align-items-center flex-wrap gap-3 py-2 px-3 bg-white border rounded">
            <span class="fw-bold d-flex align-items-center">
                <i class="bi bi-folder2-open me-2"></i>{{ tg_project_dict.name }}
            </span>
            <span class="text-muted small" title="Project ID">
                {{ tg_project_dict.id }}
            </span>
            <div class="ms-auto d-flex align-items-center gap-2">
                <span class="badge bg-primary" title="TEI Files">TEI: {{ tg_project_dict.tei_count }}</span>
                <span class="badge bg-success" title="Images">Img: {{ tg_project_dict.img_count }}</span>
                <span class="badge bg-secondary" title="Other Files">Other: {{ tg_project_dict.other_count
                    }}</span>
            </div>
        </div>
        <div class="d-flex align-items-center ms-3">
            <button class="btn btn-sm btn-outline-secondary load-modal" title="Manage TextGrid Projects"
                data-url="{{ url_for('publication.modal_manage_projects', sessionid=tg_session_id, instance=instance, projectname=project.path) }}">
                Manage TextGrid Projects
            </button>
        </div>
    </div>
</div>
{% endif %}