"""
Authentication dependency for route protection.

Standalone desktop mode: returns a default local user (no JWT required).
When license-key or SSO auth is added, switch back to current_active_user.
"""
from datetime import datetime, timezone
from app.models import User

# Default local user for standalone desktop mode.
_LOCAL_USER = User(
    id="local",
    email="local@desktop",
    hashed_password="",
    name="Local User",
    is_active=True,
    is_verified=True,
    created_at=datetime.now(timezone.utc),
)


async def get_current_user() -> User:
    """Return default local user. No authentication required in standalone mode."""
    return _LOCAL_USER


# To restore JWT auth, uncomment the following:
# from app.users import current_active_user
# get_current_user = current_active_user
