o
    ,&]i[                     @  sj   d dl mZ d dlmZmZ d dlmZmZmZ d dl	m
Z d dlmZ er,d dlmZ G dd dZd	S )
    )annotations)TYPE_CHECKINGcast)LayoutConfig	SpaceSizevalidate_space_size)Space)gather_metrics)DeltaGeneratorc                   @  s0   e Zd Zed	ddddZedd	d
ZdS )
SpaceMixinspacesmallsizer   returnr
   c                 C  s,   t  }t| t||d}| jjd||dS )a  Add vertical or horizontal space.

        This command adds space in the direction of its parent container. In
        a vertical layout, it adds vertical space. In a horizontal layout, it
        adds horizontal space.

        Parameters
        ----------
        size : "small", "medium", "large", "stretch", or int
            The size of the space. This can be one of the following values:

            - ``"small"`` (default): 0.75rem, which is the height of a widget
              label. This is useful for aligning buttons with labeled widgets.
            - ``"medium"``: 2.5rem, which is the height of a button or
              (unlabeled) input field.
            - ``"large"``: 4.25rem, which is the height of a labeled input
              field or unlabeled media widget, like `st.file_uploader`.
            - ``"stretch"``: Expands to fill remaining space in the container.
            - An integer: Fixed size in pixels.

        Examples
        --------
        **Example 1: Use vertical space to align elements**

        Use small spaces to replace label heights. Use medium spaces to replace
        two label heights or a button.

        >>> import streamlit as st
        >>>
        >>> left, middle, right = st.columns(3)
        >>>
        >>> left.space("medium")
        >>> left.button("Left button", width="stretch")
        >>>
        >>> middle.space("small")
        >>> middle.text_input("Middle input")
        >>>
        >>> right.audio_input("Right uploader")

        .. output::
            https://doc-space-vertical.streamlit.app/
            height: 260px

        **Example 2: Add horizontal space in a container**

        Use stretch space to float elements left and right.

        >>> import streamlit as st
        >>>
        >>> with st.container(horizontal=True):
        ...     st.button("Left")
        ...     st.space("stretch")
        ...     st.button("Right")

        .. output::
            https://doc-space-horizontal.streamlit.app/
            height: 200px

        )widthheightr   )layout_config)
SpaceProtor   r   dg_enqueue)selfr   space_protor    r   V/var/www/html/IGF-ODF-V3/venv/lib/python3.10/site-packages/streamlit/elements/space.pyr       s   @zSpaceMixin.spacec                 C  s
   t d| S )zGet our DeltaGenerator.r
   )r   )r   r   r   r   r   n   s   
zSpaceMixin.dgN)r   )r   r   r   r
   )r   r
   )__name__
__module____qualname__r	   r   propertyr   r   r   r   r   r      s    Mr   N)
__future__r   typingr   r   #streamlit.elements.lib.layout_utilsr   r   r   streamlit.proto.Space_pb2r   r   streamlit.runtime.metrics_utilr	   streamlit.delta_generatorr
   r   r   r   r   r   <module>   s   