
    Pi                        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d	S )
zgr.Timer() component.    )annotations)TYPE_CHECKING)document)	Component)Eventsc                  l     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.

    Guides: more-blocks-features, time-plots
       T)activerendervaluefloatr   boolr   c               \    || _         t                                          ||           dS )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.
        )r   r   N)r   super__init__)selfr   r   r   	__class__s       k/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/gradio/components/timer.pyr   zTimer.__init__   s/     uV44444    payloadfloat | Nonereturnc                    |S )z
        Parameters:
            payload: The interval of the timer as a float or None.
        Returns:
            The interval of the timer as a float.
         )r   r   s     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.postprocess5   s	     r   dictc                
    ddiS )Ntypenumberr   r   s    r   api_infozTimer.api_info>   s    !!r   c                    dS Nr
   r   r#   s    r   example_payloadzTimer.example_payloadA       qr   c                    dS r&   r   r#   s    r   example_valuezTimer.example_valueD   r(   r   c                    dS )z:Timer components should not break wrapper grouping chains.Fr   r#   s    r   breaks_groupingzTimer.breaks_groupingG   s    ur   )r
   )r   r   r   r   r   r   )r   r   r   r   )r   r   r   r   )r   r   )r   r   )__name__
__module____qualname____doc__r   tickEVENTSr   r   r   r$   r'   r*   r,   __classcell__)r   s   @r   r	   r	      s          	F 5 5 5 5 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 0 0 0 0 0 , , , , , ,             	 
8 8 8 8 8I 8 8 8 8 8r   