
    Pi                        d Z ddl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             G d de	                      Zd	S )
zgr.Navbar() component.    )annotations)AnyLiteral)document)	Component)Eventsc                  p     e Zd ZdZej        gZ	 ddddddddd fdZddZddZ	d dZ
d!dZd!dZ xZS )"Navbara  
    Creates a navigation bar component for multipage Gradio apps. The navbar component allows customizing the
    appearance of the navbar for that page. Only one Navbar component can exist per page in a Blocks app,
    and it can be placed anywhere within the page.

    The Navbar component is designed to control the appearance of the navigation bar in multipage
    applications. When present in a Blocks app, its properties override the default navbar behavior.

    Example:
        ```python
        import gradio as gr

        with gr.Blocks() as demo:
            navbar = gr.Navbar(
                visible=True,
                main_page_name="My App",
                value=[("Analytics", "analytics"), ("About", "https://twitter.com/abidlabs")]
            )
            gr.Textbox(label="Main page content")

        with demo.route("About"):
            gr.Markdown("This is the about page")

        demo.launch()
        ```
    Guides: multipage-apps
    NTHome)visiblemain_page_nameelem_idelem_classesrenderkeyvaluelist[tuple[str, str]] | Noner   boolr   str | Literal[False]r   
str | Noner   list[str] | str | Noner   r   (int | str | tuple[int | str, ...] | Nonec               r    || _         || _        t                                          ||||||           dS )a  
        Parameters:
            value: If a list of tuples of (page_name, page_path) are provided, these additional pages will be added to the navbar alongside the existing pages defined in the Blocks app. The page_path can be either a relative path for internal Gradio app pages (e.g., "analytics") or an absolute URL for external links (e.g., "https://twitter.com/username"). Otherwise, only the pages defined using the `Blocks.route` method will be displayed. Example: [("Dashboard", "dashboard"), ("About", "https://twitter.com/abidlabs")]
            visible: If True, the navbar will be visible. If False, the navbar will be hidden.
            main_page_name: The title to display in the navbar for the main page of the Gradio. If False, the main page will not be displayed in the navbar.
            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 list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
            render: If False, component will not render 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.
        )r   r   r   r   r   r   N)r   r   super__init__)	selfr   r   r   r   r   r   r   	__class__s	           l/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/gradio/components/navbar.pyr   zNavbar.__init__-   sQ    * ,% 	 	
 	
 	
 	
 	
    payloadreturnc                    |S N )r   r    s     r   
preprocesszNavbar.preprocessN   s	     r   c                    |S r#   r$   )r   r   s     r   postprocesszNavbar.postprocessS   s	     r   dict[str, Any]c                    i S r#   r$   r   s    r   api_infozNavbar.api_infoX   s    	r   c                    d S r#   r$   r*   s    r   example_payloadzNavbar.example_payload[       tr   c                    d S r#   r$   r*   s    r   example_valuezNavbar.example_value^   r.   r   r#   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r    r   r!   r   )r   r   r!   r   )r!   r(   )r!   r   )__name__
__module____qualname____doc__r   changeEVENTSr   r%   r'   r+   r-   r0   __classcell__)r   s   @r   r
   r
      s         8 m_F /3
 /5"/38<
 
 
 
 
 
 
 
B   
   
             r   r
   N)r4   
__future__r   typingr   r   gradio_client.documentationr   gradio.components.baser   gradio.eventsr   r
   r$   r   r   <module>r=      s      " " " " " "         0 0 0 0 0 0 , , , , , ,             
Q Q Q Q QY Q Q Q Q Qr   