from __future__ import annotations

from fastapi import APIRouter, Depends

from app.core.dependencies import get_current_user
from app.core.responses import api_success
from app.models.user import User
from app.schemas.user import UserProfile

router = APIRouter()


@router.get("/profile")
def profile(current_user: User = Depends(get_current_user)) -> dict:
    return api_success(UserProfile.model_validate(current_user).model_dump(mode="json"))
