§
    ÆPƒiÅ  ã                  óÂ   — 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	 d dl
mZmZ d dlmZ  G d„ d	ee	¬
¦  «        Z e¦   «          G d„ dee	¬
¦  «        ¦   «         ZeZdS )é    )Úannotations)ÚLiteral)Údocument)ÚBlockContext)ÚComponentMeta)ÚEventListenerÚEvents)ÚI18nDatac                  óH   — e Zd ZdZej        ej        gZddddddddœdd„ZdS )ÚTabsz{
    Tabs is a layout element within Blocks that can contain multiple "Tab" Components.
    Guides: controlling-layout
    NT)ÚselectedÚvisibleÚelem_idÚelem_classesÚrenderÚkeyÚpreserved_by_keyr   úint | str | Noner   úbool | Literal['hidden']r   ú
str | Noner   úlist[str] | str | Noner   Úboolr   ú(int | str | tuple[int | str, ...] | Noner   c          	     óJ   — t          j        | ||||||¬¦  «         || _        dS )a  
        Parameters:
            selected: The currently selected tab. Must correspond to an id passed to the one of the child TabItems. Defaults to the first TabItem.
            visible: If False, Tabs will be hidden.
            elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
            elem_classes: An optional string or list of strings that are assigned as the class of this component in the HTML DOM. Can be used for targeting CSS styles.
            render: If False, this layout will not be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.
            key: in a gr.render, Components with the same key across re-renders are treated as the same component, not a new component. Properties set in 'preserved_by_key' are not reset across a re-render.
            preserved_by_key: A list of parameters from this component's constructor. Inside a gr.render() function, if a component is re-rendered with the same key, these (and only these) parameters will be preserved in the UI (if they have been changed by the user or an event listener) instead of re-rendered based on the values provided during constructor.
        )r   r   r   r   r   r   N)r   Ú__init__r   )Úselfr   r   r   r   r   r   r   s           úg/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/gradio/layouts/tabs.pyr   zTabs.__init__   s@   € õ* 	ÔØØØØ%ØØØ-ð	
ñ 	
ô 	
ð 	
ð !ˆŒˆˆó    )r   r   r   r   r   r   r   r   r   r   r   r   r   r   )	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r	   ÚchangeÚselectÚEVENTSr   © r   r   r   r      sc   € € € € € ðð ð
 Œm˜Vœ]Ð+€Fð
 &*Ø,0Ø"Ø/3ØØ8<Ø37ð!ð !ð !ð !ð !ð !ð !ð !r   r   )Ú	metaclassc            
      ód   — e Zd ZdZ edd„ d¬¦  «        gZ	 	 	 d"ddddddddd	œd#d„Zd$d „Zd!„ ZdS )%ÚTaba³  
    Tab (or its alias TabItem) is a layout element. Components defined within the Tab will be visible when this tab is selected tab.
    Example:
        with gr.Blocks() as demo:
            with gr.Tab("Lion"):
                gr.Image("lion.jpg")
                gr.Button("New Lion")
            with gr.Tab("Tiger"):
                gr.Image("tiger.jpg")
                gr.Button("New Tiger")
    Guides: controlling-layout
    r$   c                ó$   — t          | dd¦  «        S )NÚ_selectableT)Úsetattr)Úblocks    r   ú<lambda>zTab.<lambda>H   s   € ¥7¨5°-ÀÑ#FÔ#F€ r   a
  Event listener for when the user selects the Tab. Uses event data gradio.SelectData to carry `value` referring to the label of the Tab, and `selected` to refer to state of the Tab. See https://www.gradio.app/main/docs/gradio/eventdata documentation for more details.)ÚcallbackÚdocNTF)Úidr   r   Úscaler   r   r   Úrender_childrenÚlabelústr | I18nData | Noner   r   Úinteractiver   r1   r   r   r   r   r   r2   ú
int | Noner   r   r   r   r3   c               óŽ   — t          j        | ||||	|
¬¦  «         || _        || _        || _        || _        || _        || _        dS )a  
        Parameters:
            label: The visual label for the tab
            id: An optional identifier for the tab, required if you wish to control the selected tab from a predict function.
            elem_id: An optional string that is assigned as the id of the <div> containing the contents of the Tab layout. The same string followed by "-button" is attached to the Tab button. Can be used for targeting CSS styles.
            elem_classes: An optional string or list of strings that are assigned as the class of this component in the HTML DOM. Can be used for targeting CSS styles.
            render: If False, this layout will not be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.
            scale: relative size compared to adjacent elements. 1 or greater indicates the Tab will expand in size.
            visible: If False, Tab will be hidden.
            interactive: If False, Tab will not be clickable.
            render_children: If True, the children of this Tab will be rendered on the page (but hidden) when the Tab is visible but inactive. This can be useful if you want to ensure that any components (e.g. videos or audio) within the Tab are pre-loaded before the user clicks on the Tab.
        )r   r   r   r   r   N)r   r   r4   r1   r   r2   r6   r3   )r   r4   r   r6   r1   r   r   r2   r   r   r   r3   s               r   r   zTab.__init__M   sd   € õ6 	ÔØØØ%ØØØ-ð	
ñ 	
ô 	
ð 	
ð ˆŒ
ØˆŒØˆŒØˆŒ
Ø&ˆÔØ.ˆÔÐÐr   Úreturnú
type[Tabs]c                ó   — t           S )N)r   ©r   s    r   Úget_expected_parentzTab.get_expected_parentw   s   € Ýˆr   c                ó   — dS )NÚtabitemr&   r<   s    r   Úget_block_namezTab.get_block_namez   s   € Øˆyr   )NTT)r4   r5   r   r   r6   r   r1   r   r   r   r   r   r2   r7   r   r   r   r   r   r   r3   r   )r9   r:   )	r   r    r!   r"   r   r%   r   r=   r@   r&   r   r   r)   r)   6   s¶   € € € € € ðð ð 	ˆØØFÐFð ]ð	
ñ 	
ô 	
ð€Fð (,Ø,0Ø ð	(/ð  $Ø"Ø/3Ø ØØ8<Ø37Ø %ð(/ð (/ð (/ð (/ð (/ð (/ðTð ð ð ðð ð ð ð r   r)   N)Ú
__future__r   Útypingr   Úgradio_client.documentationr   Úgradio.blocksr   Úgradio.component_metar   Úgradio.eventsr   r	   Úgradio.i18nr
   r   r)   ÚTabItemr&   r   r   ú<module>rI      s  ðØ "Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ð Ð à 0Ð 0Ð 0Ð 0Ð 0Ð 0à &Ð &Ð &Ð &Ð &Ð &Ø /Ð /Ð /Ð /Ð /Ð /Ø /Ð /Ð /Ð /Ð /Ð /Ð /Ð /Ø  Ð  Ð  Ð  Ð  Ð  ð&!ð &!ð &!ð &!ð &!ˆ< =ð &!ñ &!ô &!ð &!ðR 
€„ðDð Dð Dð Dð Dˆ, -ð Dñ Dô Dñ „ðDðN €€€r   