"""
Pages Views Blueprint

This module provides web UI routes for static/stub pages:
- Profile page
- Sessions page
- Mechanics page
- Leaderboard page
- Settings page
- Help page

These are currently stub pages that will be implemented in future phases.
"""

from flask import Blueprint, render_template
from app.utils.auth import require_auth_web
from app.utils.logging import get_logger


# Initialize logger
logger = get_logger(__file__)

# Create blueprint
pages_bp = Blueprint('pages', __name__)


@pages_bp.route('/profile')
@require_auth_web
def profile():
    """
    Display player profile page.

    Currently a stub - will show player stats, achievements, etc.
    """
    logger.info("Accessing profile page")
    return render_template('pages/profile.html')


@pages_bp.route('/sessions')
@require_auth_web
def sessions():
    """
    Display active game sessions page.

    Currently a stub - will show list of active/past sessions.
    """
    logger.info("Accessing sessions page")
    return render_template('pages/sessions.html')


@pages_bp.route('/mechanics')
@require_auth_web
def mechanics():
    """
    Display game mechanics reference page.

    Currently a stub - will explain combat, skills, items, etc.
    """
    logger.info("Accessing mechanics page")
    return render_template('pages/mechanics.html')


@pages_bp.route('/leaderboard')
@require_auth_web
def leaderboard():
    """
    Display leaderboard page.

    Currently a stub - will show top players, achievements, etc.
    """
    logger.info("Accessing leaderboard page")
    return render_template('pages/leaderboard.html')


@pages_bp.route('/settings')
@require_auth_web
def settings():
    """
    Display user settings page.

    Currently a stub - will allow account settings, preferences, etc.
    """
    logger.info("Accessing settings page")
    return render_template('pages/settings.html')


@pages_bp.route('/help')
@require_auth_web
def help_page():
    """
    Display help/guide page.

    Currently a stub - will provide tutorials, FAQs, support info.
    """
    logger.info("Accessing help page")
    return render_template('pages/help.html')
