<!-- bedrock_server_manager//web/templates/backup_menu.html -->
{# Extends the base layout template #}
{% extends "base.html" %}

{# --- Page Title Block --- #}
{% block title %}{{ super() }} - Backup Menu: {{ server_name }}{% endblock %}

{# --- Main Content Block --- #}
{% block content %}
<h2>Backup Options</h2>
<p>Server: <strong>{{ server_name }}</strong></p>
<div id="status-message-area" class="message-box" style="opacity: 0; transition: opacity 0.5s ease-out;">
    <!-- Status messages from backup actions will appear here -->
</div>

<section class="backup-menu-section" id="backup-restore-page" data-server-name="{{ server_name | e }}">
    <p>Choose a backup action:</p>
    <div class="button-group action-buttons-group" style="margin-bottom: 20px;">
        <button type="button" id="backup-world-btn" class="action-button">
            Backup World Now
        </button>
        {# Ensure 'backup_config_select_page' is the correct route name defined in your FastAPI router #}
        <a href="{{ request.url_for('backup_config_select_page', server_name=server_name) if request else '#' }}" class="action-button">
            Backup Config File...
        </a>
        <button type="button" id="backup-all-btn" class="action-button">
            Backup All Now
        </button>
    </div>

    <div class="navigation-link" style="margin-top: 30px;">
        {# Ensure 'index' is the correct route name for your main dashboard page in FastAPI #}
        <a href="{{ request.url_for('index') if request else '/' }}" class="action-link">
            « Back to Dashboard
        </a>
    </div>
</section>
{% endblock %}

{% block body_scripts %}
<script src="{{ request.url_for('static', path='js/backup_restore.js') }}" defer></script>
{% endblock %}