Ë
    úmxiW1  ã                  óœ   — d dl mZ d dlmZmZ d dlmZ d dl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 d d
lmZ  G d„ d«      Zy)é    )Úannotations)ÚTYPE_CHECKINGÚcast)Úvalidate_width)ÚAlert)ÚWidthConfig)Úgather_metrics)Ú
clean_textÚvalidate_icon_or_emoji)ÚDeltaGenerator)ÚWidthWithoutContent)ÚSupportsStrc                  óî   — e Zd Z ed«      dddœ	 	 	 	 	 	 	 dd„«       Z ed«      dddœ	 	 	 	 	 	 	 dd„«       Z ed«      dddœ	 	 	 	 	 	 	 dd	„«       Z ed
«      dddœ	 	 	 	 	 	 	 dd„«       Zedd„«       Z	y)Ú
AlertMixinÚerrorNÚstretch)ÚiconÚwidthc               óV  — t        «       }t        |«      |_        t        |«      |_        t         j
                  |_        t        |«       t        «       }t        |t        «      r||_        nd|_        |j                  j                  |«       | j                  j!                  d|«      S )u	  Display error message.

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

            See the ``body`` parameter of |st.markdown|_ for additional,
            supported Markdown directives.

            .. |st.markdown| replace:: ``st.markdown``
            .. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown

        icon : str, None
            An optional emoji or icon to display next to the alert. If ``icon``
            is ``None`` (default), no icon is displayed. If ``icon`` is a
            string, the following options are valid:

            - A single-character emoji. For example, you can set ``icon="ðŸš¨"``
              or ``icon="ðŸ”¥"``. Emoji short codes are not supported.

            - An icon from the Material Symbols library (rounded style) in the
              format ``":material/icon_name:"`` where "icon_name" is the name
              of the icon in snake case.

              For example, ``icon=":material/thumb_up:"`` will display the
              Thumb Up icon. Find additional icons in the `Material Symbols               <https://fonts.google.com/icons?icon.set=Material+Symbols&icon.style=Rounded>`_
              font library.

            - ``"spinner"``: Displays a spinner as an icon.

        width : "stretch" or int
            The width of the alert element. This can be one of the following:

            - ``"stretch"`` (default): The width of the element matches the
              width of the parent container.
            - An integer specifying the width in pixels: The element has a
              fixed width. If the specified width is greater than the width of
              the parent container, the width of the element matches the width
              of the parent container.

        Example
        -------
        >>> import streamlit as st
        >>>
        >>> st.error('This is an error', icon="ðŸš¨")

        TÚalert)Ú
AlertProtor   r   r
   ÚbodyÚERRORÚformatr   r   Ú
isinstanceÚintÚpixel_widthÚuse_stretchÚwidth_configÚCopyFromÚdgÚ_enqueue©Úselfr   r   r   Úalert_protor   s         úO/home/htdocs/ttos/venv/lib/python3.12/site-packages/streamlit/elements/alert.pyr   zAlertMixin.error    sˆ   € ôt !“lˆä1°$Ó7ˆÔÜ% dÓ+ˆÔÜ'×-Ñ-ˆÔä�uÔä"“}ˆä�eœSÔ!Ø',ˆLÕ$à'+ˆLÔ$à× Ñ ×)Ñ)¨,Ô7à�w‰w×Ñ ¨Ó5Ð5ó    Úwarningc               óV  — t        «       }t        |«      |_        t        |«      |_        t         j
                  |_        t        |«       t        «       }t        |t        «      r||_        nd|_        |j                  j                  |«       | j                  j!                  d|«      S )u  Display warning message.

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

            See the ``body`` parameter of |st.markdown|_ for additional,
            supported Markdown directives.

            .. |st.markdown| replace:: ``st.markdown``
            .. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown

        icon : str, None
            An optional emoji or icon to display next to the alert. If ``icon``
            is ``None`` (default), no icon is displayed. If ``icon`` is a
            string, the following options are valid:

            - A single-character emoji. For example, you can set ``icon="ðŸš¨"``
              or ``icon="ðŸ”¥"``. Emoji short codes are not supported.

            - An icon from the Material Symbols library (rounded style) in the
              format ``":material/icon_name:"`` where "icon_name" is the name
              of the icon in snake case.

              For example, ``icon=":material/thumb_up:"`` will display the
              Thumb Up icon. Find additional icons in the `Material Symbols               <https://fonts.google.com/icons?icon.set=Material+Symbols&icon.style=Rounded>`_
              font library.

            - ``"spinner"``: Displays a spinner as an icon.

        width : "stretch" or int
            The width of the warning element. This can be one of the following:

            - ``"stretch"`` (default): The width of the element matches the
              width of the parent container.
            - An integer specifying the width in pixels: The element has a
              fixed width. If the specified width is greater than the width of
              the parent container, the width of the element matches the width
              of the parent container.

        Example
        -------
        >>> import streamlit as st
        >>>
        >>> st.warning('This is a warning', icon="âš ï¸�")

        Tr   )r   r
   r   r   r   ÚWARNINGr   r   r   r   r   r   r   r   r    r!   r"   r#   s         r&   r(   zAlertMixin.warningm   óˆ   € ôt !“lˆÜ% dÓ+ˆÔÜ1°$Ó7ˆÔÜ'×/Ñ/ˆÔä�uÔä"“}ˆä�eœSÔ!Ø',ˆLÕ$à'+ˆLÔ$à× Ñ ×)Ñ)¨,Ô7à�w‰w×Ñ ¨Ó5Ð5r'   Úinfoc               óV  — t        «       }t        |«      |_        t        |«      |_        t         j
                  |_        t        |«       t        «       }t        |t        «      r||_        nd|_        |j                  j                  |«       | j                  j!                  d|«      S )u*  Display an informational message.

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

            See the ``body`` parameter of |st.markdown|_ for additional,
            supported Markdown directives.

            .. |st.markdown| replace:: ``st.markdown``
            .. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown

        icon : str, None
            An optional emoji or icon to display next to the alert. If ``icon``
            is ``None`` (default), no icon is displayed. If ``icon`` is a
            string, the following options are valid:

            - A single-character emoji. For example, you can set ``icon="ðŸš¨"``
              or ``icon="ðŸ”¥"``. Emoji short codes are not supported.

            - An icon from the Material Symbols library (rounded style) in the
              format ``":material/icon_name:"`` where "icon_name" is the name
              of the icon in snake case.

              For example, ``icon=":material/thumb_up:"`` will display the
              Thumb Up icon. Find additional icons in the `Material Symbols               <https://fonts.google.com/icons?icon.set=Material+Symbols&icon.style=Rounded>`_
              font library.

            - ``"spinner"``: Displays a spinner as an icon.

        width : "stretch" or int
            The width of the info element. This can be one of the following:

            - ``"stretch"`` (default): The width of the element matches the
              width of the parent container.
            - An integer specifying the width in pixels: The element has a
              fixed width. If the specified width is greater than the width of
              the parent container, the width of the element matches the width
              of the parent container.

        Example
        -------
        >>> import streamlit as st
        >>>
        >>> st.info('This is a purely informational message', icon="â„¹ï¸�")

        Tr   )r   r
   r   r   r   ÚINFOr   r   r   r   r   r   r   r   r    r!   r"   r#   s         r&   r,   zAlertMixin.info¹   s†   € ôv !“lˆÜ% dÓ+ˆÔÜ1°$Ó7ˆÔÜ'Ÿ_™_ˆÔä�uÔä"“}ˆä�eœSÔ!Ø',ˆLÕ$à'+ˆLÔ$à× Ñ ×)Ñ)¨,Ô7à�w‰w×Ñ ¨Ó5Ð5r'   Úsuccessc               óV  — t        «       }t        |«      |_        t        |«      |_        t         j
                  |_        t        |«       t        «       }t        |t        «      r||_        nd|_        |j                  j                  |«       | j                  j!                  d|«      S )u  Display a success message.

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

            See the ``body`` parameter of |st.markdown|_ for additional,
            supported Markdown directives.

            .. |st.markdown| replace:: ``st.markdown``
            .. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown

        icon : str, None
            An optional emoji or icon to display next to the alert. If ``icon``
            is ``None`` (default), no icon is displayed. If ``icon`` is a
            string, the following options are valid:

            - A single-character emoji. For example, you can set ``icon="ðŸš¨"``
              or ``icon="ðŸ”¥"``. Emoji short codes are not supported.

            - An icon from the Material Symbols library (rounded style) in the
              format ``":material/icon_name:"`` where "icon_name" is the name
              of the icon in snake case.

              For example, ``icon=":material/thumb_up:"`` will display the
              Thumb Up icon. Find additional icons in the `Material Symbols               <https://fonts.google.com/icons?icon.set=Material+Symbols&icon.style=Rounded>`_
              font library.

            - ``"spinner"``: Displays a spinner as an icon.

        width : "stretch" or int
            The width of the success element. This can be one of the following:

            - ``"stretch"`` (default): The width of the element matches the
              width of the parent container.
            - An integer specifying the width in pixels: The element has a
              fixed width. If the specified width is greater than the width of
              the parent container, the width of the element matches the width
              of the parent container.

        Example
        -------
        >>> import streamlit as st
        >>>
        >>> st.success('This is a success message!', icon="âœ…")

        Tr   )r   r
   r   r   r   ÚSUCCESSr   r   r   r   r   r   r   r   r    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.dgR  s   € ô Ð$ dÓ+Ð+r'   )r   r   r   z
str | Noner   r   Úreturnr   )r3   r   )
Ú__name__Ú
__module__Ú__qualname__r	   r   r(   r,   r/   Úpropertyr!   © r'   r&   r   r      sL  „ Ù�GÓð
  Ø%.ñJ6àðJ6ð ð	J6ð
 #ðJ6ð 
òJ6ó ðJ6ñX �IÓð
  Ø%.ñI6àðI6ð ð	I6ð
 #ðI6ð 
òI6ó ðI6ñV �FÓð
  Ø%.ñJ6àðJ6ð ð	J6ð
 #ðJ6ð 
òJ6ó ðJ6ñX �IÓð
  Ø%.ñI6àðI6ð ð	I6ð
 #ðI6ð 
òI6ó ðI6ðV ò,ó ñ,r'   r   N)Ú
__future__r   Útypingr   r   Ú#streamlit.elements.lib.layout_utilsr   Ústreamlit.proto.Alert_pb2r   r   Ústreamlit.proto.WidthConfig_pb2r   Ústreamlit.runtime.metrics_utilr	   Ústreamlit.string_utilr
   r   Ústreamlit.delta_generatorr   r   Ústreamlit.type_utilr   r   r8   r'   r&   ú<module>rB      s4   ðõ #ç &å >Ý 9Ý 7Ý 9ß DáÝ8ÝGÝ/÷v,ò v,r'   