
    soj              
           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	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edej        dededdf
dZ
dej        fdZdS )    )Update)ContextTypesN)validate)PredictionRemoveBetReservedKeysmanage)PredictionOption)User)PredictionException)Keyboard)full_message_send)!delete_prediction_option_for_userupdatecontextinbound_keyboarduserreturnc                    K   t          j        t           j        |                    t          j                  k              }t          ||| |           d{V  t          | |||d           d{V  dS )z
    Manage the prediction detail screen
    :param update: The update
    :param context: The context
    :param inbound_keyboard: The inbound keyboard
    :param user: The user
    :return: None
    NT)called_from_remove_confirm)r   getidr   PREDICTION_OPTION_IDvalidate_and_delete#manage_prediction_detail_remove_bet)r   r   r   r   prediction_options        L/app/src/chat/private/screens/screen_prediction_detail_remove_bet_confirm.pyr   r      s       +;*> ? TUU	V+ +
 g'8&$
G
GGGGGGGG .)4D               c                    K   	 t          |||           d{V  t          ||           d{V  t          j        }n# t          $ r}|j        }Y d}~nd}~ww xY wt          | ||dd           d{V  dS )z
    Validate and delete the prediction option for the user if valid
    :param context: The context
    :param prediction_option: The prediction option
    :param update: The update
    :param user: The user
    )r   NT)r   answer_callback
show_alert)r   r   phrasesPREDICTION_BET_REMOVE_SUCCESSr
   messager   )r   r   r   r   ot_textpes         r   r   r   +   s      vt7HIIIIIIIIII 06GHHHHHHHHH7   * GWVT^b
c
c
ccccccccccs   :? 
A	AA)src.tg_compatr   src.tg_compat.extr   resources.phrasesr    4src.chat.common.screens.screen_prediction_bet_remover   <src.chat.private.screens.screen_prediction_detail_remove_betr   r   r   src.model.PredictionOptionr   src.model.Userr	   src.model.error.CustomExceptionr
   src.model.pojo.Keyboardr   src.service.message_servicer   src.service.prediction_servicer   DEFAULT_TYPEr    r   r   <module>r2      sQ               * * * * * * # # # # # # I I I I I I        8 7 7 7 7 7       ? ? ? ? ? ? , , , , , , 9 9 9 9 9 9 L L L L L L)6JRZ^	   2d|'@ d d d d d dr   