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

import sys
from typing import Any, TYPE_CHECKING
from sphinx.application import Sphinx

"""Theming support for HTML builders."""
if sys.version_info >= (3, 10):
    ...
else:
    ...
if TYPE_CHECKING:
    ...
logger = ...
NODEFAULT = ...
THEMECONF = ...
def extract_zip(filename: str, targetdir: str) -> None:
    """Extract zip file to target directory."""
    ...

class Theme:
    """A Theme is a set of HTML templates and configurations.

    This class supports both theme directory and theme archive (zipped theme)."""
    def __init__(self, name: str, theme_path: str, factory: HTMLThemeFactory) -> None:
        ...
    
    def get_theme_dirs(self) -> list[str]:
        """Return a list of theme directories, beginning with this theme's,
        then the base theme's, then that one's base theme's, etc.
        """
        ...
    
    def get_config(self, section: str, name: str, default: Any = ...) -> Any:
        """Return the value for a theme configuration setting, searching the
        base theme chain.
        """
        ...
    
    def get_options(self, overrides: dict[str, Any] | None = ...) -> dict[str, Any]:
        """Return a dictionary of theme options and their values."""
        ...
    
    def cleanup(self) -> None:
        """Remove temporary directories."""
        ...
    


def is_archived_theme(filename: str) -> bool:
    """Check whether the specified file is an archived theme file or not."""
    ...

class HTMLThemeFactory:
    """A factory class for HTML Themes."""
    def __init__(self, app: Sphinx) -> None:
        ...
    
    def load_builtin_themes(self) -> None:
        """Load built-in themes."""
        ...
    
    def load_additional_themes(self, theme_paths: str) -> None:
        """Load additional themes placed at specified directories."""
        ...
    
    def load_extra_theme(self, name: str) -> None:
        """Try to load a theme with the specified name."""
        ...
    
    def load_alabaster_theme(self) -> None:
        """Load alabaster theme."""
        ...
    
    def load_external_theme(self, name: str) -> None:
        """Try to load a theme using entry_points.

        Sphinx refers to ``sphinx_themes`` entry_points.
        """
        ...
    
    def find_themes(self, theme_path: str) -> dict[str, str]:
        """Search themes from specified directory."""
        ...
    
    def create(self, name: str) -> Theme:
        """Create an instance of theme."""
        ...
    


