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

from typing import Any, Literal

class Error(Exception):
    """The base class for all exceptions thrown by Streamlit.

    Should be used for exceptions raised due to user errors (typically via
    StreamlitAPIException) as well as exceptions raised by Streamlit's internal
    code.
    """
    ...


class CustomComponentError(Error):
    """Exceptions thrown in the custom components code path."""
    ...


class DeprecationError(Error):
    ...


class FragmentStorageKeyError(Error, KeyError):
    """A KeyError raised when a KeyError is encountered during a FragmentStorage
    operation.
    """
    ...


class FragmentHandledException(Exception):
    """An exception that is raised by the fragment
    when it has handled the exception itself.
    """
    ...


class NoStaticFiles(Error):
    ...


class NoSessionContext(Error):
    ...


class MarkdownFormattedException(Error):
    """Exceptions with Markdown in their description.

    Instances of this class can use markdown in their messages, which will get
    nicely formatted on the frontend.
    """
    ...


class StreamlitAPIException(MarkdownFormattedException):
    """Base class for Streamlit API exceptions.

    An API exception should be thrown when user code interacts with the
    Streamlit API incorrectly. (That is, when we throw an exception as a
    result of a user's malformed `st.foo` call, it should be a
    StreamlitAPIException or subclass.)

    When displaying these exceptions on the frontend, we strip Streamlit
    entries from the stack trace so that the user doesn't see a bunch of
    noise related to Streamlit internals.

    """
    def __repr__(self) -> str:
        ...
    


class DuplicateWidgetID(StreamlitAPIException):
    ...


class StreamlitAuthError(StreamlitAPIException):
    ...


class StreamlitDuplicateElementId(DuplicateWidgetID):
    """An exception raised when the auto-generated ID of an element is not unique."""
    def __init__(self, element_type: str) -> None:
        ...
    


class StreamlitDuplicateElementKey(DuplicateWidgetID):
    """An exception raised when the key of an element is not unique."""
    def __init__(self, user_key: str) -> None:
        ...
    


class UnserializableSessionStateError(StreamlitAPIException):
    ...


class StreamlitAPIWarning(StreamlitAPIException, Warning):
    """Used to display a warning.

    Note that this should not be "raised", but passed to st.exception
    instead.
    """
    def __init__(self, *args) -> None:
        ...
    
    def __repr__(self) -> str:
        ...
    


class StreamlitModuleNotFoundError(StreamlitAPIWarning):
    """Print a pretty message when a Streamlit command requires a dependency
    that is not one of our core dependencies.
    """
    def __init__(self, module_name, *args) -> None:
        ...
    


class LocalizableStreamlitException(StreamlitAPIException):
    def __init__(self, message: str, **kwargs) -> None:
        ...
    
    @property
    def exec_kwargs(self) -> dict[str, Any]:
        ...
    


class StreamlitSetPageConfigMustBeFirstCommandError(LocalizableStreamlitException):
    """Exception raised when the set_page_config command is not the first executed streamlit command."""
    def __init__(self) -> None:
        ...
    


class StreamlitInvalidPageLayoutError(LocalizableStreamlitException):
    """Exception raised when an invalid value is specified for layout."""
    def __init__(self, layout: str) -> None:
        ...
    


class StreamlitInvalidSidebarStateError(LocalizableStreamlitException):
    """Exception raised when an invalid value is specified for `initial_sidebar_state`."""
    def __init__(self, initial_sidebar_state: str) -> None:
        ...
    


class StreamlitInvalidMenuItemKeyError(LocalizableStreamlitException):
    """Exception raised when an invalid key is specified."""
    def __init__(self, key: str) -> None:
        ...
    


class StreamlitInvalidURLError(LocalizableStreamlitException):
    """Exception raised when an invalid URL is specified for any of the menu items except for “About”."""
    def __init__(self, url: str) -> None:
        ...
    


class StreamlitInvalidColumnSpecError(LocalizableStreamlitException):
    """Exception raised when no weights are specified, or a negative weight is specified."""
    def __init__(self) -> None:
        ...
    


class StreamlitInvalidVerticalAlignmentError(LocalizableStreamlitException):
    """Exception raised when an invalid value is specified for vertical_alignment."""
    def __init__(self, vertical_alignment: str) -> None:
        ...
    


class StreamlitInvalidColumnGapError(LocalizableStreamlitException):
    """Exception raised when an invalid value is specified for gap."""
    def __init__(self, gap: str) -> None:
        ...
    


class StreamlitSelectionCountExceedsMaxError(LocalizableStreamlitException):
    """Exception raised when there are more default selections specified than the max allowable selections."""
    def __init__(self, current_selections_count: int, max_selections_count: int) -> None:
        ...
    


class StreamlitMixedNumericTypesError(LocalizableStreamlitException):
    """Exception raised mixing floats and ints in st.number_input."""
    def __init__(self, value: int | float | Literal["min"] | None, min_value: int | float | None, max_value: int | float | None, step: int | float | None) -> None:
        ...
    


class StreamlitValueBelowMinError(LocalizableStreamlitException):
    """Exception raised when the `min_value` is greater than the `value`."""
    def __init__(self, value: int | float, min_value: int | float) -> None:
        ...
    


class StreamlitValueAboveMaxError(LocalizableStreamlitException):
    """Exception raised when the `max_value` is less than the `value`."""
    def __init__(self, value: int | float, max_value: int | float) -> None:
        ...
    


class StreamlitJSNumberBoundsError(LocalizableStreamlitException):
    """Exception raised when a number exceeds the Javascript limits."""
    def __init__(self, message: str) -> None:
        ...
    


class StreamlitInvalidNumberFormatError(LocalizableStreamlitException):
    """Exception raised when the format string for `st.number_input` contains
    invalid characters.
    """
    def __init__(self, format: str) -> None:
        ...
    


class StreamlitMissingPageLabelError(LocalizableStreamlitException):
    """Exception raised when a page_link is created without a label."""
    def __init__(self) -> None:
        ...
    


class StreamlitPageNotFoundError(LocalizableStreamlitException):
    """Exception raised the linked page can not be found."""
    def __init__(self, page: str, main_script_directory: str, uses_pages_directory: bool) -> None:
        ...
    


class StreamlitFragmentWidgetsNotAllowedOutsideError(LocalizableStreamlitException):
    """Exception raised when the fragment attempts to write to an element outside of its container."""
    def __init__(self) -> None:
        ...
    


class StreamlitInvalidFormCallbackError(LocalizableStreamlitException):
    """Exception raised a `on_change` callback is set on any element in a form except for the `st.form_submit_button`."""
    def __init__(self) -> None:
        ...
    


class StreamlitValueAssignmentNotAllowedError(LocalizableStreamlitException):
    """Exception raised when trying to set values where writes are not allowed."""
    def __init__(self, key: str) -> None:
        ...
    


class StreamlitInvalidColorError(LocalizableStreamlitException):
    def __init__(self, color) -> None:
        ...
    


class StreamlitBadTimeStringError(LocalizableStreamlitException):
    """Exception Raised when a time string argument is passed that cannot be parsed."""
    def __init__(self, time_string: str) -> None:
        ...
    


class StreamlitSecretNotFoundError(LocalizableStreamlitException, FileNotFoundError):
    """Exception raised when a secret cannot be found or parsed in the secrets.toml file."""
    def __init__(self, message: str) -> None:
        ...
    


class StreamlitInvalidWidthError(LocalizableStreamlitException):
    """Exception raised when an invalid width value is provided."""
    def __init__(self, width: Any, allow_content: bool = ...) -> None:
        ...
    


