Ë
    úmxiE  ã                  ód   — d dl mZ d dlmZmZ d dlmZ  G d„ ded¬«      Z G d„ d	e«      Zdd
„Z	y)é    )Úannotations)ÚAnyÚ	TypedDict)ÚAttributeDictionaryc                  ó   — e Zd ZdZy)ÚBidiComponentStatezÓ
    The schema for the state of a bidirectional component.

    The state is a flat dictionary-like object (key -> value) that supports
    both key and attribute notation via :class:`AttributeDictionary`.
    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó    úc/home/htdocs/ttos/venv/lib/python3.12/site-packages/streamlit/components/v2/bidi_component/state.pyr   r      s   „ òr   r   F)Útotalc                  ó4   ‡ — e Zd ZdZ	 	 d	 	 	 	 	 dˆ fd„Zˆ xZS )ÚBidiComponentResulta®  The schema for the custom component result object.

    The custom component result object is a dictionary-like object that
    supports both key and attribute notation. It contains all of the
    component's state and trigger values.

    Attributes
    ----------
    <state_keys> : Any
        All state values from the component. State values are persistent across
        app reruns until explicitly changed. You can have multiple state keys
        as attributes.
    <trigger_keys> : Any
        All trigger values from the component. Trigger values are transient and
        reset to ``None`` after one script run. You can have multiple trigger
        keys as attributes.

    c                ó<   •— |€i }|€i }t         ‰| �  i |¥|¥«       y)a'  Initialize a BidiComponentResult.

        Parameters
        ----------
        state_vals : dict[str, Any] or None
            A dictionary of state values from the component.
        trigger_vals : dict[str, Any] or None
            A dictionary of trigger values from the component.
        N)ÚsuperÚ__init__)ÚselfÚ
state_valsÚtrigger_valsÚ	__class__s      €r   r   zBidiComponentResult.__init__6   sA   ø€ ð ÐØˆJØÐØˆLä‰Ñðð
 ðð ðõ		
r   )NN)r   údict[str, Any] | Noner   r   ÚreturnÚNone)r	   r
   r   r   r   Ú__classcell__)r   s   @r   r   r   "   s6   ø„ ñð* -1Ø.2ð
à)ð
ð ,ð
ð 
÷	
ñ 
r   r   c                ó<   — t        | t        «      rt        | «      S i S )z¼Return flat mapping when given a dict; otherwise, empty dict.

    The new canonical state is flat, so this is effectively an identity for
    dict inputs and a guard for other types.
    )Ú
isinstanceÚdict)Ú	raw_states    r   Úunwrap_component_stater"   U   s   € ô )¨´DÔ9Œ4�	‹?ÐA¸rÐAr   N)r!   r   r   zdict[str, Any])
Ú
__future__r   Útypingr   r   Ústreamlit.utilr   r   r   r"   r   r   r   ú<module>r&      s2   ðõ #ç !å .ô˜¨%õ ô0
Ð-ô 0
ôfBr   