{% extends "base.html" %}

{% block title %}Reports - {{ title }}{% endblock %}

{% block content %}
<div class="row">
    <div class="col-12">
        <div class="card">
            <div class="card-body">
                <h2 class="card-title mb-4">
                    <i class="bi bi-file-text"></i> Analysis Reports
                </h2>

                {% if report_path %}
                <div class="alert alert-success">
                    <i class="bi bi-check-circle"></i> Report generated successfully
                </div>

                <div class="d-grid gap-2">
                    <a href="/api/download/{{ session_id }}/report" class="btn btn-primary">
                        <i class="bi bi-download"></i> Download Full Report
                    </a>
                </div>

                <hr>

                <h5>Report Preview</h5>
                <p class="text-muted">Full report available for download above.</p>

                {% else %}
                <div class="alert alert-warning">
                    <i class="bi bi-exclamation-triangle"></i> No report available yet. Analysis may still be in progress.
                </div>

                <a href="/session/{{ session_id }}" class="btn btn-outline-primary">
                    <i class="bi bi-arrow-left"></i> Back to Session
                </a>
                {% endif %}
            </div>
        </div>
    </div>
</div>
{% endblock %}
