
    &e                         d dl mZmZmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZmZ d dlmZ erd dlmZ ded	efd
Z G d d          ZdS )    )TYPE_CHECKINGOptionalcast)StreamlitAPIException)Toast)gather_metrics)
clean_textvalidate_emoji)SupportsStr)DeltaGenerator
toast_textreturnc                 J    t          |           dk    rt          d          | S )N z6Toast body cannot be blank - please provide a message.)strr   )r   s    8lib/python3.11/site-packages/streamlit/elements/toast.pyvalidate_textr      s0    
:"#E
 
 	
     c                   n    e Zd Z ed          dddedee         ddfd            Zed
d	            Z	dS )
ToastMixintoastN)iconbodyr   r   r   c                    t                      }t          t          |                    |_        t	          |          |_        | j                            d|          S )u  Display a short message, known as a notification "toast".
        The toast appears in the app's bottom-right corner and disappears after four seconds.

        .. warning::
            ``st.toast`` is not compatible with Streamlit's `caching             <https://docs.streamlit.io/library/advanced-features/caching>`_ and
            cannot be called within a cached function.

        Parameters
        ----------
        body : str
            The string to display as Github-flavored Markdown. Syntax
            information can be found at: https://github.github.com/gfm.

            This also supports:

            * Emoji shortcodes, such as ``:+1:``  and ``:sunglasses:``.
              For a list of all supported codes,
              see https://share.streamlit.io/streamlit/emoji-shortcodes.

            * LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"
              must be on their own lines). Supported LaTeX functions are listed
              at https://katex.org/docs/supported.html.

            * Colored text, using the syntax ``:color[text to be colored]``,
              where ``color`` needs to be replaced with any of the following
              supported colors: blue, green, orange, red, violet, gray/grey, rainbow.
        icon : str or None
            An optional argument that specifies an emoji to use as
            the icon for the toast. Shortcodes are not allowed, please use a
            single character instead. E.g. "🚨", "🔥", "🤖", etc.
            Defaults to None, which means no icon is displayed.

        Example
        -------
        >>> import streamlit as st
        >>>
        >>> st.toast('Your edited image was saved!', icon='😍')
        r   )
ToastProtor	   r   r   r
   r   dg_enqueue)selfr   r   toast_protos       r   r   zToastMixin.toast%   sN    \ !ll%mD&9&9::)$//w555r   c                 "    t          d|           S )zGet our DeltaGenerator.r   )r   )r   s    r   r   zToastMixin.dgX   s     $d+++r   )r   r   )
__name__
__module____qualname__r   r   r   r   r   propertyr    r   r   r   r   $   s        ^G
 #	06 06 0606 sm	06
 
06 06 06 06d , , , X, , ,r   r   N)typingr   r   r   streamlit.errorsr   streamlit.proto.Toast_pb2r   r   streamlit.runtime.metrics_utilr   streamlit.string_utilr	   r
   streamlit.type_utilr   streamlit.delta_generatorr   r   r   r%   r   r   <module>r-      s    1 0 0 0 0 0 0 0 0 0 2 2 2 2 2 2 9 9 9 9 9 9 9 9 9 9 9 9 < < < < < < < < + + + + + + 9888888k k    7, 7, 7, 7, 7, 7, 7, 7, 7, 7,r   