
    %e7                     x    d dl mZmZmZ d dlmZ d dlmZ d dl	m
Z
mZ erd dlmZ d dlmZ  G d d          Zd	S )
    )TYPE_CHECKINGOptionalcast)Alert)gather_metrics)
clean_textvalidate_emoji)DeltaGenerator)SupportsStrc                   F   e Zd Z ed          dddddee         ddfd	            Z ed
          dddddee         ddfd            Z ed          dddddee         ddfd            Z ed          dddddee         ddfd            Z	e
dd            ZdS )
AlertMixinerrorN)iconbodyr   r   returnr
   c                    t                      }t          |          |_        t          |          |_        t           j        |_        | j                            d|          S )u:  Display error message.

        Parameters
        ----------
        body : str
            The error text to display.
        icon : str or None
            An optional argument that specifies an emoji to use as
            the icon for the alert. 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.error('This is an error', icon="🚨")

        alert)	
AlertProtor	   r   r   r   ERRORformatdg_enqueueselfr   r   alert_protos       8lib/python3.11/site-packages/streamlit/elements/alert.pyr   zAlertMixin.error   sP    4 !ll)$//%d++'-w555    warningc                    t                      }t          |          |_        t          |          |_        t           j        |_        | j                            d|          S )uC  Display warning message.

        Parameters
        ----------
        body : str
            The warning text to display.
        icon : str or None
            An optional argument that specifies an emoji to use as
            the icon for the alert. 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.warning('This is a warning', icon="⚠️")

        r   )	r   r   r   r	   r   WARNINGr   r   r   r   s       r   r   zAlertMixin.warning;   P    4 !ll%d++)$//'/w555r   infoc                    t                      }t          |          |_        t          |          |_        t           j        |_        | j                            d|          S )u[  Display an informational message.

        Parameters
        ----------
        body : str
            The info text to display.
        icon : str or None
            An optional argument that specifies an emoji to use as
            the icon for the alert. 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.info('This is a purely informational message', icon="ℹ️")

        r   )	r   r   r   r	   r   INFOr   r   r   r   s       r   r"   zAlertMixin.info[   sO    6 !ll%d++)$//'_w555r   successc                    t                      }t          |          |_        t          |          |_        t           j        |_        | j                            d|          S )uK  Display a success message.

        Parameters
        ----------
        body : str
            The success text to display.
        icon : str or None
            An optional argument that specifies an emoji to use as
            the icon for the alert. 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.success('This is a success message!', icon="✅")

        r   )	r   r   r   r	   r   SUCCESSr   r   r   r   s       r   r%   zAlertMixin.success|   r!   r   c                 "    t          d|           S )zGet our DeltaGenerator.r
   )r   )r   s    r   r   zAlertMixin.dg   s     $d+++r   )r   r
   )__name__
__module____qualname__r   r   strr   r   r"   r%   propertyr    r   r   r   r      s       ^G
 #	6 6 66 sm	6
 
6 6 6 6> ^I
 #	6 6 66 sm	6
 
6 6 6 6> ^F
 #	6 6 66 sm	6
 
6 6 6 6@ ^I
 #	6 6 66 sm	6
 
6 6 6 6> , , , X, , ,r   r   N)typingr   r   r   streamlit.proto.Alert_pb2r   r   streamlit.runtime.metrics_utilr   streamlit.string_utilr   r	   streamlit.delta_generatorr
   streamlit.type_utilr   r   r.   r   r   <module>r5      s    1 0 0 0 0 0 0 0 0 0 9 9 9 9 9 9 9 9 9 9 9 9 < < < < < < < < 0888888//////E, E, E, E, E, E, E, E, E, E,r   