# mypy: disable-error-code="misc, override, attr-defined, no-redef, assignment"

from typing import Set, Tuple, overload

class Element:
    def __init__(self, arg0: str) -> None: ...
    @overload
    def addChild(self, arg0: Element) -> Element: ...
    @overload
    def addChild(self, arg0: Element, arg1: int) -> Element: ...
    def addText(self, arg0: str) -> None: ...
    def copy(self) -> Element: ...
    def deleteAttr(self, arg0: str) -> None: ...
    def getAttr(self, arg0: str) -> str: ...
    def getAttrDict(self) -> dict: ...
    def getAttrNames(self) -> list[str]: ...
    def getChild(self, arg0: int) -> Element: ...
    def getElementType(self) -> str: ...
    def getNumberOfChildren(self) -> int: ...
    def getOpaqueElement(self) -> OpaqueElement: ...
    def getText(self, arg0: int) -> str: ...
    def hasAttr(self, arg0: str) -> bool: ...
    def hasText(self, arg0: int) -> bool: ...
    def isTypeOf(self, arg0: str) -> bool: ...
    def removeAllChildren(self) -> None: ...
    def removeChild(self, arg0: int) -> None: ...
    def setAttr(self, arg0: str, arg1: object) -> None: ...
    def setElementType(self, arg0: str) -> None: ...
    def setText(self, arg0: str, arg1: int) -> None: ...
    @overload
    def write(self, file: str, outputStyles=...) -> None: ...
    @overload
    def write(self, file: object, outputStyles=...) -> None: ...
    def writeString(self, outputStyles=...) -> str: ...
    def __bool__(self) -> bool: ...
    def __contains__(self, other: str) -> bool: ...
    def __delitem__(self, other: str) -> None: ...
    def __getitem__(self, index: str) -> str: ...
    def __iter__(self) -> Element_iter: ...
    def __len__(self) -> int: ...
    def __setitem__(self, index: str, object: object) -> None: ...

class Element_iter:
    def __init__(self, *args, **kwargs) -> None: ...
    def __next__(self): ...

class OpaqueElement:
    def __init__(self) -> None: ...
    def getElement(self, *args, **kwargs): ...
    def getSize(self) -> int: ...
    def getUncompressedSize(self) -> int: ...

class OutputStyles:
    def __init__(self) -> None: ...
    def addToAttrOrder(self, arg0: str, arg1: str) -> None: ...
    def clearAttrOrder(self, arg0: str) -> None: ...
    def deleteStyle(self, arg0: str) -> None: ...
    def getAttrOrder(self, arg0: str) -> list[str]: ...
    def getStyleNames(self) -> list[str]: ...
    def hasStyle(self, arg0: str) -> bool: ...

class Parser:
    def __init__(self) -> None: ...
    def getParseDepthLimit(self) -> int: ...
    def getParsedByteOffsetBegin(self, arg0: Element) -> int: ...
    def getParsedByteOffsetEnd(self, arg0: Element) -> int: ...
    def isByteOffsetRecordingEnabled(self) -> bool: ...
    def isTextParsingEnabled(self) -> bool: ...
    @overload
    def parse(self, arg0: str) -> Element: ...
    @overload
    def parse(self, arg0: object) -> Element: ...
    def parseString(self, arg0: str) -> Element: ...
    def setByteOffsetRecordingEnabled(self, arg0: bool) -> None: ...
    def setParseDepthLimit(self, arg0: int) -> None: ...
    def setTextParsingEnabled(self, arg0: bool) -> None: ...
