)L i4 dZddlmZddlmZddlmZmZddlm Z ddl m Z m Z ddl mZddlmZmZmZmZdd lmZdd lmZd d lmZmZmZmZd gZGdd Zy)zJ Collection of reusable components for building full screen applications. ) annotations)Sequence)has_completions has_focus)AnyFormattedText) focus_nextfocus_previous) KeyBindings) AnyContainerDynamicContainerHSplitVSplit) AnyDimension) Dimension)BoxButtonFrameShadowDialogcFeZdZdZ d ddZddZy)ra Simple dialog window. This is the base for input dialogs, message dialogs and confirmation dialogs. Changing the title and body of the dialog is possible at runtime by assigning to the `body` and `title` attributes of this class. :param body: Child container object. :param title: Text to be displayed in the heading of the dialog. :param buttons: A list of `Button` widgets, displayed at the bottom. Nc |_|_|xsg}t}t|dkDrXt |d}t |d} |j d|t |j d| t|rTtttfdtddd tt|d| tdd d  g} n|} t} | j dtt| j dtt ttfd| d|dn|| |} |rt| d|_y| _y)Nrrleft)filterrightcjSNbodyselfsd/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/prompt_toolkit/widgets/dialogs.pyz!Dialog.__init__..Gs dii) preferredmax)r paddingpadding_bottom)r( key_bindings)minr'r&)r heighttabzs-tabcjSr)titler!sr#r$z!Dialog.__init__..\s djjr%zclass:dialog.body)r0r stylewidthr*modalrz class:dialog)r r1r2)r r0r lenraddr rr rr Drrrr container) r"r r0buttonsr3r2with_background buttons_kbfirst_selected last_selected frame_bodykbframes ` r#__init__zDialog.__init__*sc  -R!] w/N :> J :JNN7M>N :: F -.?@ !A1 5'( #GQZP QA; J J].uo-.z:0w/0@().6tE     e>ODN"DNr%c|jSr)r7r!s r#__pt_container__zDialog.__pt_container__ks ~~r%)NTNF)r r r0rr8zSequence[Button] | Noner3boolr2rr9rDreturnNone)rEr )__name__ __module__ __qualname____doc__r@rBr%r#rrsg #%+/" %?#?# ?#) ?#  ?#  ?#?# ?#Br%N)rJ __future__rtypingrprompt_toolkit.filtersrrprompt_toolkit.formatted_textr)prompt_toolkit.key_binding.bindings.focusrr 'prompt_toolkit.key_binding.key_bindingsr prompt_toolkit.layout.containersr r r rprompt_toolkit.layout.dimensionrrr6baserrrr__all__rrKr%r#rVsN#=:P? 9:,,   OOr%