from collections.abc import Callable

__all__ = ["Sequencer", "getSequencer", "setSequencer"]

from typing import overload

class _Counter:
    _value: int
    def __init__(self) -> None: ...
    def setFormatter(self, formatFunc: Callable[[int], str]) -> None: ...
    def reset(self, value: int | None = None) -> None: ...
    def next(self) -> int: ...
    __next__ = next
    def _this(self) -> int: ...
    def nextf(self) -> str: ...
    def thisf(self) -> str: ...
    def chain(self, otherCounter: _Counter) -> None: ...

class Sequencer:
    def __init__(self) -> None: ...
    def __next__(self) -> int: ...
    def next(self, counter=None) -> int: ...
    def thisf(self, counter=None) -> str: ...
    def nextf(self, counter=None) -> str: ...
    def setDefaultCounter(self, default=None) -> None: ...
    def registerFormat(self, format: str, func: Callable[[int], str]) -> None: ...
    def setFormat(self, counter, format: str) -> None: ...
    def reset(self, counter=None, base: int = 0) -> None: ...
    def chain(self, parent, child) -> None: ...
    def __getitem__(self, key: str) -> str: ...
    def format(self, template: str) -> str: ...
    def dump(self) -> None: ...

def getSequencer() -> Sequencer: ...
@overload
def setSequencer(seq: Sequencer) -> Sequencer: ...
@overload
def setSequencer(seq: None) -> None: ...
