
    ;3h                        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 d dlmZ  e        G d d	ee	
             Zy)    )annotations)Literal)document)BlockContext)ComponentMeta)Events)I18nDatac                      e Zd ZdZej
                  ej                  gZ	 ddddddddddd		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d	dZy)
Sidebara#  
    Sidebar is a collapsible panel that renders child components on the left side of the screen within a Blocks layout.
    Example:
        with gr.Blocks() as demo:
            with gr.Sidebar():
                gr.Textbox()
                gr.Button()
    Guides: controlling-layout
    NTi@  left)	openvisibleelem_idelem_classesrenderwidthpositionkeypreserved_by_keyc       	   	     t    || _         || _        || _        || _        t	        j
                  | |||||	|
       y)a  
        Parameters:
            label: name of the sidebar. Not displayed to the user.
            open: if True, sidebar is open by default.
            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.
            width: The width of the sidebar, specified in pixels if a number is passed, or in CSS units if a string is passed.
            position: The position of the sidebar in the layout, either "left" or "right". Defaults to "left".
            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)labelr   r   r   r   __init__)selfr   r   r   r   r   r   r   r   r   r   s              V/var/www/html/audio-gradio/venv/lib/python3.12/site-packages/gradio/layouts/sidebar.pyr   zSidebar.__init__   sC    4 
	
 %-	
    )N)r   zstr | I18nData | Noner   boolr   r   r   z
str | Noner   list[str] | str | Noner   r   r   z	int | strr   zLiteral['left', 'right']r   z(int | str | tuple[int | str, ...] | Noner   r   )	__name__
__module____qualname____doc__r   expandcollapseEVENTSr    r   r   r   r      s     mmV__-F (,&
 "/3-38<37&
$&
 	&

 &
 &
 -&
 &
 &
 +&
 6&
 1&
r   r   )	metaclassN)
__future__r   typingr   gradio_client.documentationr   gradio.blocksr   gradio.component_metar   gradio.eventsr   gradio.i18nr	   r   r%   r   r   <module>r.      s9    "  0 & /     
3
lm 3
 3
r   