import typing

import android.content
import android.graphics.drawable
import java
import java.chaquopy
import java.io
import java.lang
import java.util
import org.osmdroid
import org.osmdroid.tileprovider
import org.osmdroid.tileprovider.constants

class BitmapTileSourceBase(ITileSource, org.osmdroid.tileprovider.constants.OpenStreetMapTileProviderConstants):
    mImageFilenameEnding: str = ...
    mName: str = ...
    random: java.util.Random = ...
    def __init__(self, aName: str | java.lang.String, aResourceId: org.osmdroid.ResourceProxy.string, aZoomMinLevel: int | java.jint | java.lang.Integer, aZoomMaxLevel: int | java.jint | java.lang.Integer, aTileSizePixels: int | java.jint | java.lang.Integer, aImageFilenameEnding: str | java.lang.String, /) -> None: ...
    @typing.overload
    def getDrawable(self, aFileInputStream: java.io.InputStream, /) -> android.graphics.drawable.Drawable: ...
    @typing.overload
    def getDrawable(self, aFilePath: str | java.lang.String, /) -> android.graphics.drawable.Drawable: ...
    def getMaximumZoomLevel(self) -> int: ...
    def getMinimumZoomLevel(self) -> int: ...
    def getTileRelativeFilenameString(self, tile: org.osmdroid.tileprovider.MapTile, /) -> str: ...
    def getTileSizePixels(self) -> int: ...
    def imageFilenameEnding(self) -> str: ...
    def localizedName(self, proxy: org.osmdroid.ResourceProxy, /) -> str: ...
    def name(self) -> str: ...
    def ordinal(self) -> int: ...
    def pathBase(self) -> str: ...

    class LowMemoryException(java.lang.Exception):
        @typing.overload
        def __init__(self, arg1: BitmapTileSourceBase, pDetailMessage: str | java.lang.String, /) -> None: ...
        @typing.overload
        def __init__(self, arg1: BitmapTileSourceBase, pThrowable: java.lang.Throwable, /) -> None: ...

class CloudmadeTileSource(IStyledTileSource[java.lang.Integer], OnlineTileSourceBase):
    def __init__(self, pName: str | java.lang.String, pResourceId: org.osmdroid.ResourceProxy.string, pZoomMinLevel: int | java.jint | java.lang.Integer, pZoomMaxLevel: int | java.jint | java.lang.Integer, pTileSizePixels: int | java.jint | java.lang.Integer, pImageFilenameEnding: str | java.lang.String, pBaseUrl: java.chaquopy.JavaArray[java.lang.String], /) -> None: ...
    def getStyle(self) -> int: ...
    def getTileURLString(self, pTile: org.osmdroid.tileprovider.MapTile, /) -> str: ...
    def pathBase(self) -> str: ...
    @typing.overload
    def setStyle(self, pStyle: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def setStyle(self, pStyle: str | java.lang.String, /) -> None: ...

_IStyledTileSource__T = typing.TypeVar('_IStyledTileSource__T')  # <T>
class IStyledTileSource(java.lang.Object, typing.Generic[_IStyledTileSource__T]):
    def getStyle(self) -> _IStyledTileSource__T: ...
    @typing.overload
    def setStyle(self, arg1: _IStyledTileSource__T, /) -> None: ...
    @typing.overload
    def setStyle(self, arg1: str | java.lang.String, /) -> None: ...

class ITileSource(java.lang.Object):
    @typing.overload
    def getDrawable(self, arg1: java.io.InputStream, /) -> android.graphics.drawable.Drawable: ...
    @typing.overload
    def getDrawable(self, arg1: str | java.lang.String, /) -> android.graphics.drawable.Drawable: ...
    def getMaximumZoomLevel(self) -> int: ...
    def getMinimumZoomLevel(self) -> int: ...
    def getTileRelativeFilenameString(self, arg1: org.osmdroid.tileprovider.MapTile, /) -> str: ...
    def getTileSizePixels(self) -> int: ...
    def localizedName(self, arg1: org.osmdroid.ResourceProxy, /) -> str: ...
    def name(self) -> str: ...
    def ordinal(self) -> int: ...

class MapBoxTileSource(OnlineTileSourceBase):
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, name: str | java.lang.String, resourceId: org.osmdroid.ResourceProxy.string, zoomMinLevel: int | java.jint | java.lang.Integer, zoomMaxLevel: int | java.jint | java.lang.Integer, tileSizePixels: int | java.jint | java.lang.Integer, imageFilenameEnding: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, name: str | java.lang.String, resourceId: org.osmdroid.ResourceProxy.string, zoomMinLevel: int | java.jint | java.lang.Integer, zoomMaxLevel: int | java.jint | java.lang.Integer, tileSizePixels: int | java.jint | java.lang.Integer, imageFilenameEnding: str | java.lang.String, mapBoxMapId: str | java.lang.String, mapBoxVersionBaseUrl: str | java.lang.String, /) -> None: ...
    @staticmethod
    def getMapBoxMapId() -> str: ...
    def getTileURLString(self, aMapTile: org.osmdroid.tileprovider.MapTile, /) -> str: ...
    @staticmethod
    def retrieveMapBoxMapId(aContext: android.content.Context, /) -> None: ...

class OnlineTileSourceBase(BitmapTileSourceBase):
    def __init__(self, aName: str | java.lang.String, aResourceId: org.osmdroid.ResourceProxy.string, aZoomMinLevel: int | java.jint | java.lang.Integer, aZoomMaxLevel: int | java.jint | java.lang.Integer, aTileSizePixels: int | java.jint | java.lang.Integer, aImageFilenameEnding: str | java.lang.String, aBaseUrl: java.chaquopy.JavaArray[java.lang.String], /) -> None: ...
    def getBaseUrl(self) -> str: ...
    def getTileURLString(self, arg1: org.osmdroid.tileprovider.MapTile, /) -> str: ...

class QuadTreeTileSource(OnlineTileSourceBase):
    def __init__(self, aName: str | java.lang.String, aResourceId: org.osmdroid.ResourceProxy.string, aZoomMinLevel: int | java.jint | java.lang.Integer, aZoomMaxLevel: int | java.jint | java.lang.Integer, aTileSizePixels: int | java.jint | java.lang.Integer, aImageFilenameEnding: str | java.lang.String, aBaseUrl: java.chaquopy.JavaArray[java.lang.String], /) -> None: ...
    def getTileURLString(self, aTile: org.osmdroid.tileprovider.MapTile, /) -> str: ...
    def quadTree(self, aTile: org.osmdroid.tileprovider.MapTile, /) -> str: ...

class TileSourceFactory(java.lang.Object):
    BASE_OVERLAY_NL: typing.ClassVar[OnlineTileSourceBase] = ...
    CLOUDMADESMALLTILES: typing.ClassVar[OnlineTileSourceBase] = ...
    CLOUDMADESTANDARDTILES: typing.ClassVar[OnlineTileSourceBase] = ...
    CYCLEMAP: typing.ClassVar[OnlineTileSourceBase] = ...
    DEFAULT_TILE_SOURCE: typing.ClassVar[OnlineTileSourceBase] = ...
    FIETS_OVERLAY_NL: typing.ClassVar[OnlineTileSourceBase] = ...
    MAPNIK: typing.ClassVar[OnlineTileSourceBase] = ...
    MAPQUESTAERIAL: typing.ClassVar[OnlineTileSourceBase] = ...
    MAPQUESTOSM: typing.ClassVar[OnlineTileSourceBase] = ...
    PUBLIC_TRANSPORT: typing.ClassVar[OnlineTileSourceBase] = ...
    ROADS_OVERLAY_NL: typing.ClassVar[OnlineTileSourceBase] = ...
    def __init__(self) -> None: ...
    @staticmethod
    def addTileSource(mTileSource: ITileSource, /) -> None: ...
    @staticmethod
    def containsTileSource(aName: str | java.lang.String, /) -> bool: ...
    @typing.overload
    @staticmethod
    def getTileSource(aOrdinal: int | java.jint | java.lang.Integer, /) -> ITileSource: ...
    @typing.overload
    @staticmethod
    def getTileSource(aName: str | java.lang.String, /) -> ITileSource: ...
    @staticmethod
    def getTileSources() -> java.util.ArrayList[ITileSource]: ...

class XYTileSource(OnlineTileSourceBase):
    def __init__(self, aName: str | java.lang.String, aResourceId: org.osmdroid.ResourceProxy.string, aZoomMinLevel: int | java.jint | java.lang.Integer, aZoomMaxLevel: int | java.jint | java.lang.Integer, aTileSizePixels: int | java.jint | java.lang.Integer, aImageFilenameEnding: str | java.lang.String, aBaseUrl: java.chaquopy.JavaArray[java.lang.String], /) -> None: ...
    def getTileURLString(self, aTile: org.osmdroid.tileprovider.MapTile, /) -> str: ...
