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

from typing import Callable, Final, TYPE_CHECKING
from streamlit.runtime.session_manager import ActiveSessionInfo, SessionClient, SessionInfo, SessionManager, SessionStorage
from streamlit.runtime.script_data import ScriptData
from streamlit.runtime.scriptrunner.script_cache import ScriptCache
from streamlit.runtime.uploaded_file_manager import UploadedFileManager

if TYPE_CHECKING:
    ...
_LOGGER: Final = ...
class WebsocketSessionManager(SessionManager):
    """A SessionManager used to manage sessions with lifecycles tied to those of a
    browser tab's websocket connection.

    WebsocketSessionManagers differentiate between "active" and "inactive" sessions.
    Active sessions are those with a currently active websocket connection. Inactive
    sessions are sessions without. Eventual cleanup of inactive sessions is a detail left
    to the specific SessionStorage that a WebsocketSessionManager is instantiated with.
    """
    def __init__(self, session_storage: SessionStorage, uploaded_file_manager: UploadedFileManager, script_cache: ScriptCache, message_enqueued_callback: Callable[[], None] | None) -> None:
        ...
    
    def connect_session(self, client: SessionClient, script_data: ScriptData, user_info: dict[str, str | bool | None], existing_session_id: str | None = ..., session_id_override: str | None = ...) -> str:
        ...
    
    def disconnect_session(self, session_id: str) -> None:
        ...
    
    def get_active_session_info(self, session_id: str) -> ActiveSessionInfo | None:
        ...
    
    def is_active_session(self, session_id: str) -> bool:
        ...
    
    def list_active_sessions(self) -> list[ActiveSessionInfo]:
        ...
    
    def close_session(self, session_id: str) -> None:
        ...
    
    def get_session_info(self, session_id: str) -> SessionInfo | None:
        ...
    
    def list_sessions(self) -> list[SessionInfo]:
        ...
    


