from _typeshed import Incomplete, Unused
from typing import ClassVar
from typing_extensions import Literal

from openpyxl.descriptors.base import Alias, Bool, Convertible, _ConvertibleToBool, _ConvertibleToMultiCellRange
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.worksheet.cell_range import MultiCellRange

class ConditionalFormatting(Serialisable):
    tagname: ClassVar[str]
    sqref: Convertible[MultiCellRange, Literal[False]]
    cells: Alias
    pivot: Bool[Literal[True]]
    cfRule: Incomplete
    rules: Alias
    def __init__(
        self, sqref: _ConvertibleToMultiCellRange = (), pivot: _ConvertibleToBool | None = None, cfRule=(), extLst: Unused = None
    ) -> None: ...
    def __eq__(self, other): ...
    def __hash__(self) -> int: ...
    def __contains__(self, coord): ...

class ConditionalFormattingList:
    max_priority: int
    def __init__(self) -> None: ...
    def add(self, range_string, cfRule) -> None: ...
    def __bool__(self) -> bool: ...
    def __len__(self) -> int: ...
    def __iter__(self): ...
    def __getitem__(self, key): ...
    def __delitem__(self, key) -> None: ...
    def __setitem__(self, key, rule) -> None: ...
