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

from typing import TYPE_CHECKING
from streamlit.runtime.caching.cache_data_api import CACHE_DATA_MESSAGE_REPLAY_CTX, CacheDataAPI, get_data_cache_stats_provider
from streamlit.runtime.caching.cache_errors import CACHE_DOCS_URL
from streamlit.runtime.caching.cache_resource_api import CACHE_RESOURCE_MESSAGE_REPLAY_CTX, CacheResourceAPI, get_resource_cache_stats_provider
from streamlit.runtime.caching.legacy_cache_api import cache as _cache
from google.protobuf.message import Message
from streamlit.proto.Block_pb2 import Block

if TYPE_CHECKING:
    ...
def save_element_message(delta_type: str, element_proto: Message, invoked_dg_id: str, used_dg_id: str, returned_dg_id: str) -> None:
    """Save the message for an element to a thread-local callstack, so it can
    be used later to replay the element when a cache-decorated function's
    execution is skipped.
    """
    ...

def save_block_message(block_proto: Block, invoked_dg_id: str, used_dg_id: str, returned_dg_id: str) -> None:
    """Save the message for a block to a thread-local callstack, so it can
    be used later to replay the block when a cache-decorated function's
    execution is skipped.
    """
    ...

def save_media_data(image_data: bytes | str, mimetype: str, image_id: str) -> None:
    ...

cache_data = ...
cache_resource = ...
cache = ...
__all__ = ["cache", "CACHE_DOCS_URL", "save_element_message", "save_block_message", "save_media_data", "get_data_cache_stats_provider", "get_resource_cache_stats_provider", "cache_data", "cache_resource"]
