<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Django Issue Capture - Demo</title>

    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Bootstrap Icons -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css" rel="stylesheet">
</head>
<body class="bg-light">
    <!-- Navigation -->
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
        <div class="container">
            <a class="navbar-brand" href="/">
                <i class="bi bi-bug-fill me-2"></i>Issue Capture
            </a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav me-auto">
                    <li class="nav-item">
                        <a class="nav-link active" href="/">
                            <i class="bi bi-house me-1"></i>Home
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'django_issue_capture:list' %}">
                            <i class="bi bi-list-ul me-1"></i>Issues
                        </a>
                    </li>
                </ul>
                <ul class="navbar-nav">
                    {% if user.is_authenticated %}
                        {% if user.is_staff or user.is_superuser %}
                        <li class="nav-item">
                            <a class="nav-link" href="{% url 'admin:index' %}">
                                <i class="bi bi-gear-fill me-1"></i>Admin
                            </a>
                        </li>
                        {% endif %}
                        <li class="nav-item">
                            <span class="nav-link text-light">
                                <i class="bi bi-person-circle me-1"></i>{{ user.username }}
                            </span>
                        </li>
                    {% endif %}
                </ul>
            </div>
        </div>
    </nav>

    <!-- Main Content -->
    <main class="container py-5">
        <div class="row justify-content-center">
            <div class="col-lg-8">
                <div class="card shadow-sm">
                    <div class="card-body">
                        <h1 class="h3 mb-4">Welcome to the Demo</h1>
                        <p class="lead">
                            This page demonstrates the floating issue capture button.
                        </p>
                        <p>
                            Look for the <span class="badge bg-danger">red bug button</span>
                            in the bottom-right corner. Click it to open the issue creation modal.
                        </p>

                        <hr class="my-4">

                        <h5>Features to Test:</h5>
                        <ul class="list-group list-group-flush mb-4">
                            <li class="list-group-item">
                                <i class="bi bi-check-circle text-success me-2"></i>
                                <strong>AI Generate</strong> - One-shot LLM-powered issue creation
                            </li>
                            <li class="list-group-item">
                                <i class="bi bi-check-circle text-success me-2"></i>
                                <strong>Standard Form</strong> - Traditional manual entry
                            </li>
                            <li class="list-group-item">
                                <i class="bi bi-check-circle text-success me-2"></i>
                                <strong>Modal UI</strong> - Centered overlay with backdrop
                            </li>
                        </ul>

                        <div class="alert alert-info">
                            <i class="bi bi-info-circle me-2"></i>
                            <strong>Note:</strong> You must be logged in as staff/superuser to see the button.
                            <a href="/admin/" class="alert-link">Go to Admin</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </main>

    <!-- Include the floating issue button -->
    {% include "django_issue_capture/_issue_button.html" %}

    <!-- Bootstrap 5 JS Bundle -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    <!-- HTMX -->
    <script src="https://unpkg.com/htmx.org@1.9.10"></script>
</body>
</html>
