o
    8U€j  ã                   @   sR  d dl mZ g d¢ZdZdZdZdZdZdZd	Z	d
Z
dZdZdZdZdZdZdZdZdZG dd„ deƒZd6dd„Zd7dd„Zd7dd„Zd7dd„Zd7dd„Zd7d d!„Zd7d"d#„Zd7d$d%„Zd7d&d'„Zed(kr§eded)d*ƒƒ eded)d+ƒƒ eded)d,ƒƒ eded)d-ƒƒ ed.ed)d/ƒƒ ed0ed)d1ƒƒ ed2ed)d3ƒƒ ed4ed)d5ƒƒ dS dS )8é    )ÚDialog)ÚshowinfoÚshowwarningÚ	showerrorÚaskquestionÚaskokcancelÚaskyesnoÚaskyesnocancelÚaskretrycancelÚerrorÚinfoZquestionÚwarningZabortretryignoreÚokZokcancelZretrycancelZyesnoZyesnocancelÚabortZretryÚignoreÚcancelZyesZnoc                   @   s   e Zd ZdZdZdS )ÚMessagezA message boxZtk_messageBoxN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úcommand© r   r   úd/home/user/.local/share/uv/python/cpython-3.10-linux-x86_64-gnu/lib/python3.10/tkinter/messagebox.pyr   =   s    r   Nc                 K   sp   |r
d|vr
||d< |rd|vr||d< | r| |d< |r ||d< t di |¤Ž ¡ }t|tƒr4|r2tS tS t|ƒS )NZiconÚtypeÚtitleÚmessager   )r   ÚshowÚ
isinstanceÚboolÚYESÚNOÚstr)r   r   Z_iconZ_typeÚoptionsÚresr   r   r   Ú_showG   s   
r%   c                 K   ó   t | |ttfi |¤ŽS )zShow an info message)r%   ÚINFOÚOK©r   r   r#   r   r   r   r   V   ó   r   c                 K   r&   )zShow a warning message)r%   ÚWARNINGr(   r)   r   r   r   r   [   r*   r   c                 K   r&   )zShow an error message)r%   ÚERRORr(   r)   r   r   r   r   `   r*   r   c                 K   r&   )zAsk a question)r%   ÚQUESTIONÚYESNOr)   r   r   r   r   e   r*   r   c                 K   ó   t | |ttfi |¤Ž}|tkS )z@Ask if operation should proceed; return true if the answer is ok)r%   r-   ÚOKCANCELr(   ©r   r   r#   Úsr   r   r   r   j   ó   r   c                 K   r/   )z0Ask a question; return true if the answer is yes)r%   r-   r.   r    r1   r   r   r   r   p   r3   r   c                 K   s2   t | |ttfi |¤Ž}t|ƒ}|tkrdS |tkS )zDAsk a question; return true if the answer is yes, None if cancelled.N)r%   r-   ÚYESNOCANCELr"   ÚCANCELr    r1   r   r   r   r	   v   s
   r	   c                 K   r/   )zDAsk if operation should be retried; return true if the answer is yes)r%   r+   ÚRETRYCANCELÚRETRYr1   r   r   r   r
   €   r3   r
   Ú__main__ZSpamzEgg InformationzEgg Warningz	Egg Alertz	Question?ZproceedzProceed?zyes/nozGot it?zyes/no/cancelzWant it?z	try againz
Try again?)NNNN)NN)Ztkinter.commondialogr   Ú__all__r,   r'   r-   r+   ZABORTRETRYIGNOREr(   r0   r6   r.   r4   ZABORTr7   ZIGNOREr5   r    r!   r   r%   r   r   r   r   r   r   r	   r
   r   Úprintr   r   r   r   Ú<module>   sN   










	÷