{% extends 'backoffice/base.html.twig' %}
{% block title %}{{ parent() }}{{ season.name }}{% endblock %}

{% block breadcrumbs %}
    <nav aria-label="breadcrumb" class="mb-3">
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="{{ path('tvdt_backoffice_index') }}">{{ 'Home'|trans }}</a></li>
            <li class="breadcrumb-item active" aria-current="page">{{ season.name }}</li>
        </ol>
    </nav>
{% endblock %}

{% block body %}
    {% set tabs = [
        {id: 'tests', label: 'Quizzes'|trans, route: 'tvdt_backoffice_season'},
        {id: 'question-bank', label: 'Question bank'|trans, route: 'tvdt_backoffice_question_bank'},
        {id: 'candidates', label: 'Candidates'|trans, route: 'tvdt_backoffice_season_candidates'},
        {id: 'settings', label: 'Settings'|trans, route: 'tvdt_backoffice_season_settings'},
    ] %}

    <h2 class="mb-3">{{ 'Season'|trans }}: {{ season.name }}</h2>
    <ul class="nav nav-tabs mb-3">
        {% for tab in tabs %}
            <li class="nav-item">
                <a class="nav-link{{ activeTab == tab.id ? ' active' }}" href="{{ path(tab.route, {seasonCode: season.seasonCode}) }}">
                    {{ tab.label }}
                </a>
            </li>
        {% endfor %}
    </ul>
    <div class="pt-3">
        {{ include(template) }}
    </div>
{% endblock body %}
