{% extends 'base.html' %}

{% block title %}
    Sbas
{% endblock %}

{% block css %}

{% endblock %}

{% block navigation %}
    <nav class="navbar navbar-expand-lg navbar-dark submenu">
        <div class="container-fluid">
            <a class="navbar-brand" href="{% url 'sbas:index' %}">SBAs</a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#sbasNavbarNav" aria-controls="sbasNavbarNav" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="sbasNavbarNav">
                <ul class="navbar-nav">
                    {% if request.user.is_authenticated %}
                        <li class="nav-item">
                            <a class="nav-link" href="{% url 'sbas:exam_list' %}"><i class="bi bi-mortarboard"></i> Exams</a>
                        </li>
                        <li class="nav-item dropdown">
                            <a class="nav-link dropdown-toggle" href="#" id="sbasQuestionsDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                                <i class="bi bi-question-circle"></i> Questions
                            </a>
                            <ul class="dropdown-menu" aria-labelledby="sbasQuestionsDropdown">
                                <li><a class="dropdown-item" href="{% url 'sbas:question_view' %}"><i class="bi bi-list-ul"></i> All Questions</a></li>
                                <li><a class="dropdown-item" href="{% url 'sbas:question_review_start' %}"><i class="bi bi-bookmarks-fill"></i> Review Questions</a></li>
                                <li><a class="dropdown-item" href="{% url 'sbas:generate_exam' %}"><i class="bi bi-journal-plus"></i> Generate Exam</a></li>
                                <li><a class="dropdown-item" href="{% url 'sbas:question_overview' %}"><i class="bi bi-journal-plus"></i> Questions Overview</a></li>
                                <li><a class="dropdown-item" href="{% url 'sbas:question_search_page' %}"><i class="bi bi-search"></i> Search Questions</a></li>

                                <!-- Additional items can be added here -->
                            </ul>
                        </li>
                        <li class="nav-item dropdown">
                            <a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false"><i class="bi bi-file-earmark-plus"></i> Create</a>
                            <ul class="dropdown-menu">
                                <li><a class="dropdown-item" href="{% url 'sbas:exam_create' %}" title="Create a new exam"><i class="bi bi-mortarboard"></i> Exam</a></li>
                                <li><a class="dropdown-item" href="{% url 'sbas:question_create' %}" title="Create a new question"><i class="bi bi-question-circle"></i> Question</a></li>
                            </ul>
                        </li>
                        <li class="nav-item dropdown">
                            <a class="nav-link dropdown-toggle" id="sbasLLMDropdown" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false"><i class="bi bi-gear"></i> LLM</a>
                            <ul class="dropdown-menu" aria-labelledby="sbasLLMDropdown">
                                <li><a class="dropdown-item" href="{% url 'sbas:llm_prompt_view' %}" title="Generate questions using LLM"><i class="bi bi-robot"></i> LLM prompt</a></li>
                                <li><a class="dropdown-item" href="{% url 'sbas:import_llm_questions' %}" title="Import questions using LLM"><i class="bi bi-upload"></i> Import Questions</a></li>
                            </ul>
                        </li>

                        {% if request.user.is_superuser %}
                            <li class="nav-item">
                                <a class="nav-link" href="{% url 'sbas:user_answer_table_view' %}" title="User answers">Answers</a>
                            </li>
                        {% endif %}
                    {% endif %}
                </ul>
            </div>
        </div>
    </nav>
{% endblock %}
{% block content %}
{% endblock %}
