"""
This type stub file was generated by pyright.
"""

from typing import Any, TYPE_CHECKING
from sphinx.domains import Domain
from sphinx.util.docutils import ReferenceRole, SphinxDirective
from collections.abc import Iterable
from docutils.nodes import Node, system_message
from sphinx.application import Sphinx
from sphinx.environment import BuildEnvironment
from sphinx.util.typing import OptionSpec

"""The index domain."""
if TYPE_CHECKING:
    ...
logger = ...
class IndexDomain(Domain):
    """Mathematics domain."""
    name = ...
    label = ...
    @property
    def entries(self) -> dict[str, list[tuple[str, str, str, str, str | None]]]:
        ...
    
    def clear_doc(self, docname: str) -> None:
        ...
    
    def merge_domaindata(self, docnames: Iterable[str], otherdata: dict[str, Any]) -> None:
        ...
    
    def process_doc(self, env: BuildEnvironment, docname: str, document: Node) -> None:
        """Process a document after it is read by the environment."""
        ...
    


class IndexDirective(SphinxDirective):
    """
    Directive to add entries to the index.
    """
    has_content = ...
    required_arguments = ...
    optional_arguments = ...
    final_argument_whitespace = ...
    option_spec: OptionSpec = ...
    def run(self) -> list[Node]:
        ...
    


class IndexRole(ReferenceRole):
    def run(self) -> tuple[list[Node], list[system_message]]:
        ...
    


def setup(app: Sphinx) -> dict[str, Any]:
    ...

