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

import sys
from typing import Any, Callable, TYPE_CHECKING
from sphinx.domains import Domain, Index
from sphinx.roles import XRefRole
from collections.abc import Iterator, Sequence
from docutils import nodes
from docutils.core import Publisher
from docutils.nodes import Element, Node, TextElement
from docutils.parsers import Parser
from docutils.parsers.rst import Directive
from docutils.transforms import Transform
from sphinx.application import Sphinx
from sphinx.builders import Builder
from sphinx.config import Config
from sphinx.environment import BuildEnvironment
from sphinx.ext.autodoc import Documenter
from sphinx.util.typing import RoleFunction, TitleGetter

"""Sphinx component registry."""
if sys.version_info >= (3, 10):
    ...
else:
    ...
if TYPE_CHECKING:
    ...
logger = ...
EXTENSION_BLACKLIST = ...
class SphinxComponentRegistry:
    def __init__(self) -> None:
        ...
    
    def add_builder(self, builder: type[Builder], override: bool = ...) -> None:
        ...
    
    def preload_builder(self, app: Sphinx, name: str) -> None:
        ...
    
    def create_builder(self, app: Sphinx, name: str, env: BuildEnvironment) -> Builder:
        ...
    
    def add_domain(self, domain: type[Domain], override: bool = ...) -> None:
        ...
    
    def has_domain(self, domain: str) -> bool:
        ...
    
    def create_domains(self, env: BuildEnvironment) -> Iterator[Domain]:
        ...
    
    def add_directive_to_domain(self, domain: str, name: str, cls: type[Directive], override: bool = ...) -> None:
        ...
    
    def add_role_to_domain(self, domain: str, name: str, role: RoleFunction | XRefRole, override: bool = ...) -> None:
        ...
    
    def add_index_to_domain(self, domain: str, index: type[Index], override: bool = ...) -> None:
        ...
    
    def add_object_type(self, directivename: str, rolename: str, indextemplate: str = ..., parse_node: Callable | None = ..., ref_nodeclass: type[TextElement] | None = ..., objname: str = ..., doc_field_types: Sequence = ..., override: bool = ...) -> None:
        ...
    
    def add_crossref_type(self, directivename: str, rolename: str, indextemplate: str = ..., ref_nodeclass: type[TextElement] | None = ..., objname: str = ..., override: bool = ...) -> None:
        ...
    
    def add_source_suffix(self, suffix: str, filetype: str, override: bool = ...) -> None:
        ...
    
    def add_source_parser(self, parser: type[Parser], override: bool = ...) -> None:
        ...
    
    def get_source_parser(self, filetype: str) -> type[Parser]:
        ...
    
    def get_source_parsers(self) -> dict[str, type[Parser]]:
        ...
    
    def create_source_parser(self, app: Sphinx, filename: str) -> Parser:
        ...
    
    def add_translator(self, name: str, translator: type[nodes.NodeVisitor], override: bool = ...) -> None:
        ...
    
    def add_translation_handlers(self, node: type[Element], **kwargs: tuple[Callable, Callable | None]) -> None:
        ...
    
    def get_translator_class(self, builder: Builder) -> type[nodes.NodeVisitor]:
        ...
    
    def create_translator(self, builder: Builder, *args: Any) -> nodes.NodeVisitor:
        ...
    
    def add_transform(self, transform: type[Transform]) -> None:
        ...
    
    def get_transforms(self) -> list[type[Transform]]:
        ...
    
    def add_post_transform(self, transform: type[Transform]) -> None:
        ...
    
    def get_post_transforms(self) -> list[type[Transform]]:
        ...
    
    def add_documenter(self, objtype: str, documenter: type[Documenter]) -> None:
        ...
    
    def add_autodoc_attrgetter(self, typ: type, attrgetter: Callable[[Any, str, Any], Any]) -> None:
        ...
    
    def add_css_files(self, filename: str, **attributes: Any) -> None:
        ...
    
    def add_js_file(self, filename: str | None, **attributes: Any) -> None:
        ...
    
    def has_latex_package(self, name: str) -> bool:
        ...
    
    def add_latex_package(self, name: str, options: str | None, after_hyperref: bool = ...) -> None:
        ...
    
    def add_enumerable_node(self, node: type[Node], figtype: str, title_getter: TitleGetter | None = ..., override: bool = ...) -> None:
        ...
    
    def add_html_math_renderer(self, name: str, inline_renderers: tuple[Callable, Callable | None] | None, block_renderers: tuple[Callable, Callable | None] | None) -> None:
        ...
    
    def add_html_theme(self, name: str, theme_path: str) -> None:
        ...
    
    def load_extension(self, app: Sphinx, extname: str) -> None:
        """Load a Sphinx extension."""
        ...
    
    def get_envversion(self, app: Sphinx) -> dict[str, str]:
        ...
    
    def get_publisher(self, app: Sphinx, filetype: str) -> Publisher:
        ...
    


def merge_source_suffix(app: Sphinx, config: Config) -> None:
    """Merge any user-specified source_suffix with any added by extensions."""
    ...

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

