
    {h_                     >    d dl mZ d dlmZ d dlmZ  G d de      Zy)    )Input)Binding)Messagec                       e Zd ZdZ G d de      Z G d de      ZdZ eddd	d
d
       edddd
d
      gZ	ddZ
ddZy)NewItemInputz;Configurable input field for creating new files or folders.c                       e Zd ZdZy)NewItemInput.Cancelledz0Emitted when the user cancels the item creation.N)__name__
__module____qualname____doc__     h/var/www/html/hubwallet-dev/venv/lib/python3.12/site-packages/atomic_assembler/widgets/new_item_input.py	Cancelledr	   	   s    >r   r   c                   (     e Zd ZdZdef fdZ xZS )NewItemInput.Submittedz0Emitted when the user submits the item creation.valuec                 0    || _         t        | 	          y )N)r   super__init__)selfr   	__class__s     r   r   zNewItemInput.Submitted.__init__   s    DJGr   )r
   r   r   r   strr   __classcell__)r   s   @r   	Submittedr      s    >	# 	 	r   r   z
    NewItemInput {
        dock: bottom;
        margin-bottom: 1;
        color: $text;
        display: none;
        border: solid #AAAA00 !important;
    }
    entersubmitSubmitT)showpriorityescapecancelCancelNc                 `   K   | j                  | j                  | j                               yw)zHandle a submit action.N)post_messager   r   r   s    r   action_submitzNewItemInput.action_submit"   s#      	$..45s   ,.c                 J   K   | j                  | j                                yw)zHandle a cancel action.N)r&   r   r'   s    r   action_cancelzNewItemInput.action_cancel'   s     $..*+s   !#)returnN)r
   r   r   r   r   r   r   DEFAULT_CSSr   BINDINGSr(   r*   r   r   r   r   r      sW    E?G ?G K 	8$F(H4$GH
6
,r   r   N)textual.widgetsr   textual.bindingr   textual.messager   r   r   r   r   <module>r1      s    ! # ##,5 #,r   