from typing import Any, Dict, Optional

__all__ = ['get_user_reports']

# Default items per page for paginated endpoints
DEFAULT_PAGE_SIZE = 100

def get_user_reports(
    auth_client: Any,
    license_uuid: str,
    limit: int = DEFAULT_PAGE_SIZE,
    page: int = 0,
) -> Dict[str, Any]:
    """
    Get the list of reports generated by the current user in the specified license.

    Args:
        auth_client: Authenticated pyRevizto instance.
        license_uuid: UUID of the license.
        limit: Number of reports per page. Defaults to 100.
        page: Page number to retrieve. Defaults to 0.

    Returns:
        Dict containing the list of reports and pagination info.

    Raises:
        ApiError: If the API request fails.
    """
    url = f"https://api.{auth_client.region}.revizto.com/v5/departure/license/{license_uuid}"
    params = {'limit': limit, 'page': page}
    return auth_client._request("GET", url, params=params)
