o
    ,&]i                     @  s   d dl mZ d dlmZmZ d dlmZmZ d dlm	Z
 d dlmZ d dlmZ er>d dlmZ d dlmZmZ d d	lmZ G d
d dZdS )    )annotations)TYPE_CHECKINGcast)LayoutConfigvalidate_width)Text)gather_metrics)
clean_text)DeltaGenerator)TextAlignmentWidth)SupportsStrc                   @  s6   e Zd ZeddddddddZedddZdS )	TextMixintextNcontentleft)helpwidthtext_alignmentbodyr   r   
str | Noner   r   r   r   returnr
   c                C  sD   t  }t||_|r||_t|dd t||d}| jjd||dS )a=	  Write text without Markdown or HTML parsing.

        For monospace text, use |st.code|_.

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

        Parameters
        ----------
        body : str
            The string to display.

        help : str or None
            A tooltip that gets displayed next to the text. If this is ``None``
            (default), no tooltip is displayed.

            The tooltip can optionally contain GitHub-flavored Markdown,
            including the Markdown directives described in the ``body``
            parameter of ``st.markdown``.

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

            - ``"content"`` (default): The width of the element matches the
              width of its content, but doesn't exceed the width of the parent
              container.
            - ``"stretch"``: 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.

        text_alignment : "left", "center", "right", or "justify"
            The horizontal alignment of the text within the element. This can
            be one of the following:

            - ``"left"`` (default): Text is aligned to the left edge.
            - ``"center"``: Text is centered.
            - ``"right"``: Text is aligned to the right edge.
            - ``"justify"``: Text is justified (stretched to fill the available
              width with the last line left-aligned).

            .. note::
                For text alignment to have a visible effect, the element's
                width must be wider than its content. If you use
                ``width="content"`` with short text, the alignment may not be
                noticeable.

        Example
        -------
        >>> import streamlit as st
        >>>
        >>> st.text("This is text\n[and more text](that's not a Markdown link).")

        .. output::
            https://doc-text.streamlit.app/
            height: 220px

        T)allow_content)r   r   r   )layout_config)	TextProtor	   r   r   r   r   dg_enqueue)selfr   r   r   r   
text_protor    r   U/var/www/html/IGF-ODF-V3/venv/lib/python3.10/site-packages/streamlit/elements/text.pyr      s   E
zTextMixin.textc                 C  s
   t d| S )zGet our DeltaGenerator.r
   )r   )r   r   r   r    r   n   s   
zTextMixin.dg)
r   r   r   r   r   r   r   r   r   r
   )r   r
   )__name__
__module____qualname__r   r   propertyr   r   r   r   r    r      s    Nr   N)
__future__r   typingr   r   #streamlit.elements.lib.layout_utilsr   r   streamlit.proto.Text_pb2r   r   streamlit.runtime.metrics_utilr   streamlit.string_utilr	   streamlit.delta_generatorr
   r   r   streamlit.type_utilr   r   r   r   r   r    <module>   s   