o
    ßÙ·id  ã                   @  s<   d Z ddlmZ ddlmZ ddlmZ G dd„ deƒZdS )zgr.Api() component.é    )Úannotations)ÚAny)Ú	Componentc                      s\   e Zd ZdZg Z	dd‡ fd	d
„Zddd„Zddd„Zddd„Zddd„Z	ddd„Z
‡  ZS )ÚApizo
    A generic component that holds any value. Used for generating APIs with no actual frontend component.
    ÚAPIÚvaluer   Ú	_api_infoúdict[str, str]ÚlabelÚstrc                   s   || _ tƒ j||d dS )z?
        Parameters:
            value: default value.
        )r   r
   N)r   ÚsuperÚ__init__)Úselfr   r   r
   ©Ú	__class__© úS/home/ubuntu/.local/lib/python3.10/site-packages/gradio/components/api_component.pyr      s   
zApi.__init__ÚpayloadÚreturnc                 C  ó   |S ©Nr   )r   r   r   r   r   Ú
preprocess   ó   zApi.preprocessc                 C  r   r   r   )r   r   r   r   r   Úpostprocess!   r   zApi.postprocessc                 C  s   | j S r   )r   ©r   r   r   r   Úapi_info$   s   zApi.api_infoc                 C  ó   | j d ur| j S dS ©Nz...©r   r   r   r   r   Úexample_payload'   ó   zApi.example_payloadc                 C  r   r   r   r   r   r   r   Úexample_value*   r    zApi.example_value)r   )r   r   r   r	   r
   r   )r   r   r   r   )r   r   r   r   )r   r	   )r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚEVENTSr   r   r   r   r   r!   Ú__classcell__r   r   r   r   r   
   s    ü



r   N)r%   Ú
__future__r   Útypingr   Úgradio.components.baser   r   r   r   r   r   Ú<module>   s
    