
    U[i                    r    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y	)
zgr.Navbar() component.    )annotations)AnyLiteral)document)	Component)Eventsc                       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()
        ```
    NTHome)visiblemain_page_nameelem_idelem_classesrenderkeyc               L    || _         || _        t        |   ||||||       y)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   valueN)r   r   super__init__)	selfr   r   r   r   r   r   r   	__class__s	           f/var/www/html/chatbot/Makanify-Chatbot-3/venv/lib/python3.12/site-packages/gradio/components/navbar.pyr   zNavbar.__init__,   s8    * ,% 	 	
    c                    |S N )r   payloads     r   
preprocesszNavbar.preprocessM   s	     r   c                    |S r   r   )r   r   s     r   postprocesszNavbar.postprocessR   s	     r   c                    i S r   r   r   s    r   api_infozNavbar.api_infoW   s    	r   c                     y r   r   r"   s    r   example_payloadzNavbar.example_payloadZ       r   c                     y r   r   r"   s    r   example_valuezNavbar.example_value]   r&   r   r   )r   list[tuple[str, str]] | Noner   boolr   zstr | Literal[False]r   z
str | Noner   zlist[str] | str | Noner   r*   r   z(int | str | tuple[int | str, ...] | None)r   r)   returnr)   )r   r)   r+   r)   )r+   zdict[str, Any])r+   r)   )__name__
__module____qualname____doc__r   changeEVENTSr   r   r    r#   r%   r(   __classcell__)r   s   @r   r
   r
      s    6 mm_F /3
 /5"/38<
+
 	

 -
 
 -
 
 6
B3	%
1	%
r   r
   N)r/   
__future__r   typingr   r   gradio_client.documentationr   gradio.components.baser   gradio.eventsr   r
   r   r   r   <module>r8      s7     "  0 ,   
PY P Pr   