from collections.abc import Generator

from _typeshed import Incomplete
from django.core.exceptions import ValidationError
from django.utils.functional import cached_property as cached_property
from wagtail.admin.staticfiles import versioned_static as versioned_static
from wagtail.blocks.base import (
    Block as Block,
)
from wagtail.blocks.base import (
    DeclarativeSubBlocksMetaclass as DeclarativeSubBlocksMetaclass,
)
from wagtail.blocks.base import (
    get_error_json_data as get_error_json_data,
)
from wagtail.blocks.base import (
    get_error_list_json_data as get_error_list_json_data,
)
from wagtail.blocks.base import (
    get_help_icon as get_help_icon,
)
from wagtail.telepath import Adapter as Adapter
from wagtail.telepath import register as register

class TypedTableBlockValidationError(ValidationError):
    cell_errors: Incomplete
    non_block_errors: Incomplete
    def __init__(self, cell_errors=None, non_block_errors=None) -> None: ...
    def as_json_data(self): ...

class TypedTable:
    template: str
    columns: Incomplete
    row_data: Incomplete
    caption: Incomplete
    def __init__(self, columns, row_data, caption: str) -> None: ...
    @property
    def rows(self) -> Generator[Incomplete]: ...
    def get_context(self, parent_context=None): ...
    def render_as_block(self, context=None): ...

class BaseTypedTableBlock(Block):
    child_blocks: Incomplete
    def __init__(self, local_blocks=None, **kwargs) -> None: ...
    @classmethod
    def construct_from_lookup(cls, lookup, child_blocks, **kwargs): ...
    def value_from_datadict(self, data, files, prefix): ...
    def get_prep_value(self, table): ...
    def get_api_representation(self, table, context=None): ...
    def normalize(self, value): ...
    def to_python(self, value): ...
    def get_form_state(self, table): ...
    def clean(self, table): ...
    def deconstruct(self): ...
    def deconstruct_with_lookup(self, lookup): ...
    def check(self, **kwargs): ...
    def render_basic(self, value, context=None): ...
    class Meta:
        default: Incomplete
        icon: str

class TypedTableBlock(BaseTypedTableBlock, metaclass=DeclarativeSubBlocksMetaclass): ...

class TypedTableBlockAdapter(Adapter):
    js_constructor: str
    def js_args(self, block): ...
    @cached_property
    def media(self): ...
