
    ;3h                    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)FormComponent)Eventsc                  x     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 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       W/var/www/html/audio-gradio/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   )r!   )r   floatr
   boolr   r'   )r   float | Nonereturnr(   )r   r(   r)   r(   )r)   dict)__name__
__module____qualname____doc__r   tickEVENTSr   r   r   r   r"   r%   __classcell__)r   s   @r   r	   r	      sd    
 	F 5 55 	5
 5 "r   r	   N)r.   
__future__r   typingr   gradio_client.documentationr   gradio.components.baser   gradio.eventsr   r	   r   r   r   <module>r7      s:     "   0 0   
2M 2 2r   