o
    �õ±j\  ã                   @  sr   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	 d dl
mZ ddlmZ d	gZG d
d	„ d	ed ƒZdS )é    )Úannotations)ÚCallable)Ú	InputHook)ÚAnyFormattedText)Ú
DummyInput)ÚDummyOutputé   )ÚApplicationÚDummyApplicationc                      sj   e Zd ZdZd$‡ fdd„Z					d%d&dd„Z				d'd(dd„Z			d)d*dd „Zd+d,d"d#„Z‡  Z	S )-r
   z‰
    When no :class:`.Application` is running,
    :func:`.get_app` will run an instance of this :class:`.DummyApplication` instead.
    ÚreturnÚNonec                   s   t ƒ jtƒ tƒ d� d S )N)ÚoutputÚinput)ÚsuperÚ__init__r   r   )Úself©Ú	__class__© ú“/root/aizidognhua/tmp/workspace/projects/ec89d86c-575f-41c9-af57-ac45cbdbf775/venv/lib/python3.10/site-packages/prompt_toolkit/application/dummy.pyr      s   zDummyApplication.__init__NTFÚpre_runúCallable[[], None] | NoneÚset_exception_handlerÚboolÚhandle_sigintÚ	in_threadÚ	inputhookúInputHook | Nonec                 C  s   t dƒ‚©Nz*A DummyApplication is not supposed to run.©ÚNotImplementedError)r   r   r   r   r   r   r   r   r   Úrun   s   zDummyApplication.runç      à?Úslow_callback_durationÚfloatc                 Ã  s
   �t dƒ‚r   r   )r   r   r   r   r#   r   r   r   Ú	run_async$   s   €zDummyApplication.run_asyncÚ ÚcommandÚstrÚwait_for_enterÚdisplay_before_textr   Ú	wait_textc                 Ã  s   �t ‚©Nr   )r   r'   r)   r*   r+   r   r   r   Úrun_system_command-   s   €z#DummyApplication.run_system_commandÚsuspend_groupc                 C  s   t ‚r,   r   )r   r.   r   r   r   Úsuspend_to_background6   s   z&DummyApplication.suspend_to_background)r   r   )NTTFN)r   r   r   r   r   r   r   r   r   r   r   r   )NTTr"   )
r   r   r   r   r   r   r#   r$   r   r   )Tr&   r&   )
r'   r(   r)   r   r*   r   r+   r(   r   r   )T)r.   r   r   r   )
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r!   r%   r-   r/   Ú__classcell__r   r   r   r   r
      s&    úûû	N)Ú
__future__r   Úcollections.abcr   Úprompt_toolkit.eventloopr   Úprompt_toolkit.formatted_textr   Úprompt_toolkit.inputr   Úprompt_toolkit.outputr   Úapplicationr	   Ú__all__r
   r   r   r   r   Ú<module>   s    ÿ