<!DOCTYPE html>
{% set tg_project_dict = tgproject_handler.get_tg_project(current_tg_project_id) %}
{% if tg_project_dict %}
<div class="mb-4 pb-4 border-bottom">
    <div class="d-flex align-items-center mb-3">
        <div class="rounded-circle bg-success bg-opacity-10 p-2 me-3 d-flex align-items-center justify-content-center"
            style="width: 2.5rem; height: 2.5rem;">
            <i class="bi bi-folder-check text-success"></i>
        </div>
        <div class="flex-grow-1">
            <h6 class="mb-0 fw-semibold">{{ tg_project_dict.name }}</h6>
            <small class="text-muted font-monospace">{{ tg_project_dict.id }}</small>
        </div>
        <button class="btn btn-secondary btn-sm load-modal" title="Manage TextGrid Projects"
            data-url="{{ url_for('publication.modal_manage_tg_projects', sessionid=tg_session_id, instance=instance, projectname=project.path) }}">
            <i class="bi bi-pencil me-1"></i>Change
        </button>
    </div>
    <div class="d-flex gap-2">
        <div class="flex-fill bg-light rounded p-2 text-center">
            <div class="small text-muted">TEI Files</div>
            <div class="fw-bold text-primary">{{ tg_project_dict.tei_count }}</div>
        </div>
        <div class="flex-fill bg-light rounded p-2 text-center">
            <div class="small text-muted">Images</div>
            <div class="fw-bold text-success">{{ tg_project_dict.img_count }}</div>
        </div>
        <div class="flex-fill bg-light rounded p-2 text-center">
            <div class="small text-muted">Other</div>
            <div class="fw-bold text-secondary">{{ tg_project_dict.other_count }}</div>
        </div>
    </div>
</div>
{% endif %}