from collections.abc import Generator
from typing import Any

from django.utils.dateformat import Formatter
from django.utils.functional import cached_property as cached_property
from wagtail.admin.widgets.button import Button as Button
from wagtail.coreutils import multigetattr as multigetattr

class Echo:
    def write(self, value): ...

def list_to_str(value): ...

class ExcelDateFormatter(Formatter):
    data: None
    def get(self): ...
    def __getattr__(self, name): ...

class SpreadsheetExportMixin:
    FORMAT_XLSX: str
    FORMAT_CSV: str
    FORMATS: tuple[str, str]
    list_export: list[str]
    custom_field_preprocess: dict[str, dict[str, Any]]
    custom_value_preprocess: dict[type | tuple[type, ...], dict[str, Any]]
    export_headings: dict[str, str]
    export_buttons_template_name: str
    export_filename: str
    is_export: bool
    def setup(self, request, *args, **kwargs) -> None: ...
    def get_paginate_by(self, queryset): ...
    def get_filename(self): ...
    def to_row_dict(self, item): ...
    def get_preprocess_function(self, field, value, export_format): ...
    def preprocess_field_value(self, field, value, export_format): ...
    def generate_xlsx_row(self, worksheet, row_dict, date_format=None) -> Generator[Any]: ...
    def write_csv_row(self, writer, row_dict): ...
    def get_heading(self, queryset, field): ...
    def stream_csv(self, queryset) -> Generator[bytes]: ...
    def write_xlsx(self, queryset, output) -> None: ...
    def write_xlsx_response(self, queryset): ...
    def write_csv_response(self, queryset): ...
    def as_spreadsheet(self, queryset, spreadsheet_format): ...
    def get_export_url(self, format): ...
    @property
    def xlsx_export_url(self): ...
    @property
    def csv_export_url(self): ...
    @cached_property
    def show_export_buttons(self): ...
    @cached_property
    def header_more_buttons(self): ...
