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

from typing import Any, Callable, TYPE_CHECKING
from jinja2 import BaseLoader, FileSystemLoader
from jinja2.utils import pass_context
from sphinx.application import TemplateBridge
from jinja2.environment import Environment
from sphinx.builders import Builder
from sphinx.theming import Theme

"""Glue code for the jinja2 templating engine."""
if TYPE_CHECKING:
    ...
def accesskey(context: Any, key: str) -> str:
    """Helper to output each access key only once."""
    ...

class idgen:
    def __init__(self) -> None:
        ...
    
    def current(self) -> int:
        ...
    
    def __next__(self) -> int:
        ...
    
    next = ...


@pass_context
def warning(context: dict, message: str, *args: Any, **kwargs: Any) -> str:
    ...

class SphinxFileSystemLoader(FileSystemLoader):
    """
    FileSystemLoader subclass that is not so strict about '..'  entries in
    template names.
    """
    def get_source(self, environment: Environment, template: str) -> tuple[str, str, Callable]:
        ...
    


class BuiltinTemplateLoader(TemplateBridge, BaseLoader):
    """
    Interfaces the rendering environment of jinja2 for use in Sphinx.
    """
    def init(self, builder: Builder, theme: Theme | None = ..., dirs: list[str] | None = ...) -> None:
        ...
    
    def render(self, template: str, context: dict) -> str:
        ...
    
    def render_string(self, source: str, context: dict) -> str:
        ...
    
    def newest_template_mtime(self) -> float:
        ...
    
    def get_source(self, environment: Environment, template: str) -> tuple[str, str, Callable]:
        ...
    


