
    8P[iu                    t    d 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r	  e        G d de             Zy	)
zgr.Timer() component.    )annotations)TYPE_CHECKING)document)	Component)Eventsc                       e Zd ZdZej
                  gZ	 dddd	 	 	 	 	 d fdZddZddZ	ddZ
d Zd	 Zdd
Z xZS )Timerz
    Special component that ticks at regular intervals when active. It is not visible, and only used to trigger events at a regular interval through the `tick` event listener.
    T)activerenderc               6    || _         t        | 	  ||       y)aD  
        Parameters:
            value: Interval in seconds between each tick.
            active: Whether the timer is active.
            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.
        )valuer   N)r
   super__init__)selfr   r
   r   	__class__s       e/var/www/html/chatbot/Makanify-Chatbot-2/venv/lib/python3.12/site-packages/gradio/components/timer.pyr   zTimer.__init__   s     uV4    c                    |S )z
        Parameters:
            payload: The interval of the timer as a float or None.
        Returns:
            The interval of the timer as a float.
         )r   payloads     r   
preprocesszTimer.preprocess*   s	     r   c                    |S )z
        Parameters:
            value: The interval of the timer as a float or None.
        Returns:
            The interval of the timer as a float.
        r   )r   r   s     r   postprocesszTimer.postprocess3   s	     r   c                
    ddiS )Ntypenumberr   r   s    r   api_infozTimer.api_info<   s    !!r   c                     yN   r   r   s    r   example_payloadzTimer.example_payload?       r   c                     yr    r   r   s    r   example_valuezTimer.example_valueB   r#   r   c                     y)z:Timer components should not break wrapper grouping chains.Fr   r   s    r   breaks_groupingzTimer.breaks_groupingE   s    r   )r!   )r   floatr
   boolr   r)   )r   float | Nonereturnr*   )r   r*   r+   r*   )r+   dict)r+   r)   )__name__
__module____qualname____doc__r   tickEVENTSr   r   r   r   r"   r%   r'   __classcell__)r   s   @r   r	   r	      si    
 	F 5 55 	5
 5 "r   r	   N)r0   
__future__r   typingr   gradio_client.documentationr   gradio.components.baser   gradio.eventsr   r	   r   r   r   <module>r9      s:     "   0 ,   
6I 6 6r   