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

import os
from datetime import datetime
from typing import Callable, NamedTuple, TYPE_CHECKING
from collections.abc import Generator
from sphinx.environment import BuildEnvironment

"""Builder superclass for all builders."""
if TYPE_CHECKING:
    ...
logger = ...
class LocaleFileInfoBase(NamedTuple):
    base_dir: str
    domain: str
    charset: str
    ...


class CatalogInfo(LocaleFileInfoBase):
    @property
    def po_file(self) -> str:
        ...
    
    @property
    def mo_file(self) -> str:
        ...
    
    @property
    def po_path(self) -> str:
        ...
    
    @property
    def mo_path(self) -> str:
        ...
    
    def is_outdated(self) -> bool:
        ...
    
    def write_mo(self, locale: str, use_fuzzy: bool = ...) -> None:
        ...
    


class CatalogRepository:
    """A repository for message catalogs."""
    def __init__(self, basedir: str | os.PathLike[str], locale_dirs: list[str], language: str, encoding: str) -> None:
        ...
    
    @property
    def locale_dirs(self) -> Generator[str, None, None]:
        ...
    
    @property
    def pofiles(self) -> Generator[tuple[str, str], None, None]:
        ...
    
    @property
    def catalogs(self) -> Generator[CatalogInfo, None, None]:
        ...
    


def docname_to_domain(docname: str, compaction: bool | str) -> str:
    """Convert docname to domain for catalogs."""
    ...

date_format_mappings = ...
date_format_re = ...
def babel_format_date(date: datetime, format: str, locale: str, formatter: Callable = ...) -> str:
    ...

def format_date(format: str, *, date: datetime | None = ..., language: str) -> str:
    ...

def get_image_filename_for_language(filename: str | os.PathLike[str], env: BuildEnvironment) -> str:
    ...

def search_image_for_language(filename: str, env: BuildEnvironment) -> str:
    ...

