from typing import Any

from django.http import HttpRequest
from wagtail.coreutils import resolve_model_string as resolve_model_string
from wagtail.models import Page as Page
from wagtail.models import Site as Site

class BadRequestError(Exception): ...

def get_base_url(request: HttpRequest | None = None) -> str | None: ...
def get_full_url(request: HttpRequest, path: str) -> str: ...
def get_object_detail_url(router: Any, request: HttpRequest, model: type, pk: Any) -> str | None: ...
def page_models_from_string(string: str) -> tuple[type[Page], ...]: ...

class FieldsParameterParseError(ValueError): ...

def parse_fields_parameter(fields_str: str) -> list[tuple[str, bool, list[Any] | None]]: ...
def parse_boolean(value: str) -> bool: ...
