from collections.abc import Generator
from typing import Any

from django.core.exceptions import ImproperlyConfigured
from wagtail.search.backends.base import BaseSearchBackend

class InvalidSearchBackendError(ImproperlyConfigured): ...

def import_backend(dotted_path: str) -> type[BaseSearchBackend]: ...
def get_search_backend(backend: str = "default", **kwargs: Any) -> BaseSearchBackend: ...
def get_search_backends_with_name(with_auto_update: bool = False) -> Generator[tuple[str, BaseSearchBackend]]: ...
def get_search_backends(with_auto_update: bool = False) -> Generator[BaseSearchBackend]: ...
