from fastapi import APIRouter, Depends, HTTPException, status, Query
from typing import Optional, List
import sys

# Add shared modules to path
sys.path.append('/app')

from app.schemas.user import UserResponse, UserUpdate
from app.services.user_service import UserService
from app.core.dependencies import get_current_active_user
from app.models.user import User, UserStatus

router = APIRouter(prefix="/users", tags=["User Management"])

@router.get("/me", response_model=UserResponse)
async def get_current_user(current_user: User = Depends(get_current_active_user)):
    """Get current user profile"""
    return UserResponse(
        id=str(current_user.id),
        email=current_user.email,
        username=current_user.username,
        status=current_user.status,
        email_verified=current_user.email_verified,
        created_at=current_user.created_at,
        last_successful_login=current_user.last_successful_login
    )
