{% extends "layouts/base.html" %}
{% load static i18n %}

{% block title %}{% trans "Editar Nível" %} - {% trans "Battle Pass Manager" %}{% endblock %}

{% block extrastyle %}
{% include 'battle_pass/manager/_base_styles.html' %}
{% endblock %}

{% block content %}
<div class="manager-bg">
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-lg-6">
                <div class="d-flex flex-column flex-md-row justify-content-between align-items-start align-items-md-center mb-5">
                    <div class="page-header mb-3 mb-md-0">
                        <h2 class="mb-2">
                            <i class="bi bi-pencil text-warning me-2"></i>
                            {% trans "Editar Nível" %}
                        </h2>
                        <p class="text-white-50 mb-0">{% trans "Nível" %} {{ level.level }} - {{ season.name }}</p>
                    </div>
                    <a href="{% url 'games:battle_pass_manager_season_detail' season_id=season.id %}" class="btn btn-solid-white">
                        <i class="bi bi-arrow-left me-2"></i>{% trans "Voltar" %}
                    </a>
                </div>

                <div class="card card-glow">
                    <div class="card-body">
                        <form method="post">
                            {% csrf_token %}
                            <div class="mb-3">
                                <label for="level" class="form-label text-white">{% trans "Número do Nível" %} *</label>
                                <input type="number" class="form-control form-dark" id="level" name="level" 
                                       value="{{ level.level }}" min="1" required>
                            </div>
                            <div class="mb-3">
                                <label for="required_xp" class="form-label text-white">{% trans "XP Necessário" %} *</label>
                                <input type="number" class="form-control form-dark" id="required_xp" name="required_xp" 
                                       value="{{ level.required_xp }}" min="0" required>
                            </div>
                            <div class="d-flex gap-2 mt-4">
                                <button type="submit" class="btn btn-warning">
                                    <i class="bi bi-check-circle me-2"></i>{% trans "Salvar Alterações" %}
                                </button>
                                <a href="{% url 'games:battle_pass_manager_season_detail' season_id=season.id %}" class="btn btn-solid-white">
                                    {% trans "Cancelar" %}
                                </a>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}

