from typing import Any, List, Optional, Union

from dev.coatl.helper.types import AnyStr as AnyStr
from java.lang import Comparable, Enum, Object
from org.apache.poi.common import Duplicatable
from org.apache.poi.ss import SpreadsheetVersion
from org.apache.poi.util import LittleEndianOutput

class AreaReference(Object):
    def __init__(self, *args: Any) -> None: ...
    def formatAsString(self) -> AnyStr: ...
    @staticmethod
    def generateContiguous(
        version: SpreadsheetVersion, reference: AnyStr
    ) -> List[AreaReference]: ...
    def getAllReferencedCells(self) -> List[CellReference]: ...
    def getFirstCell(self) -> CellReference: ...
    def getLastCell(self) -> CellReference: ...
    @staticmethod
    def getWholeColumn(
        version: SpreadsheetVersion, start: AnyStr, end: AnyStr
    ) -> AreaReference: ...
    @staticmethod
    def getWholeRow(
        version: SpreadsheetVersion, start: AnyStr, end: AnyStr
    ) -> AreaReference: ...
    def isSingleCell(self) -> bool: ...
    @staticmethod
    def isWholeColumnReference(
        version: Optional[SpreadsheetVersion] = ...,
        topLeft: Optional[CellReference] = ...,
        botRight: Optional[CellReference] = ...,
    ) -> bool: ...

class CellAddress(Object, Comparable):
    def __init__(self, *args: Any) -> None: ...
    def compareTo(self, o: Any) -> int: ...
    def formatAsString(self) -> AnyStr: ...
    def getColumn(self) -> int: ...
    def getRow(self) -> int: ...

class CellRangeAddressBase(Object, Duplicatable):
    class CellPosition(Enum):
        BOTTOM: CellRangeAddressBase.CellPosition
        LEFT: CellRangeAddressBase.CellPosition
        RIGHT: CellRangeAddressBase.CellPosition
        TOP: CellRangeAddressBase.CellPosition
        @staticmethod
        def values() -> List[CellRangeAddressBase.CellPosition]: ...

    def containsColumn(self, colInd: int) -> bool: ...
    def containsRow(self, rowInd: int) -> bool: ...
    def copy(self) -> Duplicatable: ...
    def getFirstColumn(self) -> int: ...
    def getFirstRow(self) -> int: ...
    def getLastColumn(self) -> int: ...
    def getLastRow(self) -> int: ...
    def getNumberOfCells(self) -> int: ...
    def getPosition(self, rowInd: int, colInd: int) -> Any: ...
    def intersects(self, other: CellRangeAddressBase) -> bool: ...
    def isFullColumnRange(self) -> bool: ...
    def isFullRowRange(self) -> bool: ...
    def isInRange(self, *args: Any) -> bool: ...
    def iterator(self) -> Any: ...
    def setFirstColumn(self, firstCol: int) -> None: ...
    def setFirstRow(self, firstRow: int) -> None: ...
    def setLastColumn(self, lastCol: int) -> None: ...
    def setLastRow(self, lastRow: int) -> None: ...
    def validate(self, ssVesion: SpreadsheetVersion) -> None: ...

class CellRangeAddress(CellRangeAddressBase):
    ENCODED_SIZE: int
    def __init__(self, *args: Any) -> None: ...
    def formatAsString(
        self, sheetName: Optional[AnyStr] = ..., useAbsoluteAddress: bool = ...
    ) -> AnyStr: ...
    @staticmethod
    def getEncodedSize() -> int: ...
    def serialize(self, out: LittleEndianOutput) -> None: ...
    @staticmethod
    def valueOf(ref: AnyStr) -> CellRangeAddress: ...

class CellRangeAddressList(Object):
    def __init__(self, *args: Any) -> None: ...
    def addCellRangeAddress(self, *args: Any) -> None: ...
    def copy(self) -> CellRangeAddressList: ...
    def countRanges(self) -> int: ...
    def getCellRangeAddress(self, index: int) -> CellRangeAddress: ...
    def getCellRangeAddresses(self) -> List[CellRangeAddress]: ...
    @staticmethod
    def getEncodedSize(numberOfRanges: int) -> int: ...
    def getSize(self) -> int: ...
    def remove(self, rangeIdex: int) -> CellRangeAddress: ...
    def serialize(self, *args: Any) -> None: ...

class CellReference(Object):
    class NameType(Enum):
        BAD_CELL_OR_NAMED_RANGE: CellReference.NameType
        CELL: CellReference.NameType
        COLUMN: CellReference.NameType
        NAMED_RANGE: CellReference.NameType
        ROW: CellReference.NameType
        @staticmethod
        def values() -> List[CellReference.NameType]: ...

    def __init__(self, *args: Any) -> None: ...
    @staticmethod
    def cellReferenceIsWithinRange(
        colStr: AnyStr, rowStr: AnyStr, ssVersion: SpreadsheetVersion
    ) -> bool: ...
    @staticmethod
    def classifyCellReference(
        str_: AnyStr, ssVersion: SpreadsheetVersion
    ) -> CellReference.NameType: ...
    @staticmethod
    def convertColStringToIndex(ref: AnyStr) -> int: ...
    @staticmethod
    def converNumToColString(col: int) -> AnyStr: ...
    def formatAsString(self, includeSheetName: bool = ...) -> AnyStr: ...
    def getCellRefParts(self) -> List[AnyStr]: ...
    def getCol(self) -> int: ...
    def getRow(self) -> int: ...
    def getSheetName(self) -> AnyStr: ...
    def isColAbsolute(self) -> bool: ...
    @staticmethod
    def isColumnWithinRange(colStr: AnyStr, ssVersion: SpreadsheetVersion) -> bool: ...
    @staticmethod
    def isPartAbsolute(part: AnyStr) -> bool: ...
    def isRowAbsolute(self) -> bool: ...
    @staticmethod
    def isRowWithinRange(
        rowNumOrStr: Union[int, AnyStr], ssVersion: SpreadsheetVersion
    ) -> bool: ...

class PaneInformation(Object):
    PANE_LOWER_LEFT: int
    PANE_LOWER_RIGHT: int
    PANE_UPPER_LEFT: int
    PANE_UPPER_RIGHT: int
    def __init__(
        self, x: int, y: int, top: int, left: int, active: int, frozen: bool
    ) -> None: ...
    def getActivePane(self) -> int: ...
    def getHorizontalSplitPosition(self) -> int: ...
    def getHorizontalSplitTopRow(self) -> int: ...
    def getVerticalSplitLeftColumn(self) -> int: ...
    def getVerticalSplitPosition(self) -> int: ...
    def isFreezePane(self) -> bool: ...
