
    g
                     D    d dl mZ d dl mZ ddlmZ  G d d          ZdS )    )List)Optional   )Commandc                       e Zd ZddZedefd            Zedee         fd            Zedefd            Z	ede
e         fd            Zdeddfd	Zdd
ZddZddZddZddZdS )FedCMreturnNc                     || _         d S )N)_driver)selfdrivers     k/var/www/html/nodeJS/PythonScripts/venv3.11/lib/python3.11/site-packages/selenium/webdriver/remote/fedcm.py__init__zFedCM.__init__   s        c                 |    | j                             t          j                  d                             d          S )zGets the title of the dialog.valuetitler   executer   GET_FEDCM_TITLEgetr   s    r   r   zFedCM.title   s0     |##G$;<<WEII'RRRr   c                 |    | j                             t          j                  d                             d          S )z Gets the subtitle of the dialog.r   subtitler   r   s    r   r   zFedCM.subtitle!   s0     |##G$;<<WEII*UUUr   c                 p    | j                             t          j                                      d          S )z2Gets the type of the dialog currently being shown.r   )r   r   r   GET_FEDCM_DIALOG_TYPEr   r   s    r   dialog_typezFedCM.dialog_type&   s+     |##G$ABBFFwOOOr   c                 p    | j                             t          j                                      d          S )z.Gets the list of accounts shown in the dialog.r   )r   r   r   GET_FEDCM_ACCOUNT_LISTr   r   s    r   account_listzFedCM.account_list+   s+     |##G$BCCGGPPPr   indexc                 T    | j                             t          j        d|i           dS )z,Selects an account from the dialog by index.accountIndexN)r   r   r   SELECT_FEDCM_ACCOUNT)r   r!   s     r   select_accountzFedCM.select_account0   s(    W9NE;RSSSSSr   c                 T    | j                             t          j        ddi           dS )z)Clicks the continue button in the dialog.dialogButtonConfirmIdpLoginContinueN)r   r   r   CLICK_FEDCM_DIALOG_BUTTONr   s    r   acceptzFedCM.accept4   s)    W>Qj@klllllr   c                 N    | j                             t          j                   dS )z#Cancels/dismisses the FedCM dialog.N)r   r   r   CANCEL_FEDCM_DIALOGr   s    r   dismisszFedCM.dismiss8   s!    W899999r   c                 T    | j                             t          j        ddi           dS )z1Re-enables the promise rejection delay for FedCM.enabledTNr   r   r   SET_FEDCM_DELAYr   s    r   enable_delayzFedCM.enable_delay<   s(    W4y$6GHHHHHr   c                 T    | j                             t          j        ddi           dS )z/Disables the promise rejection delay for FedCM.r/   FNr0   r   s    r   disable_delayzFedCM.disable_delay@   s(    W4y%6HIIIIIr   c                 N    | j                             t          j                   dS )z@Resets the FedCM dialog cooldown, allowing immediate retriggers.N)r   r   r   RESET_FEDCM_COOLDOWNr   s    r   reset_cooldownzFedCM.reset_cooldownD   s!    W9:::::r   )r	   N)__name__
__module____qualname__r   propertystrr   r   r   r   r   dictr    intr%   r*   r-   r2   r4   r7    r   r   r   r      sx           Ss S S S XS V(3- V V V XV PS P P P XP Qd4j Q Q Q XQTC TD T T T Tm m m m: : : :I I I IJ J J J; ; ; ; ; ;r   r   N)typingr   r   commandr   r   r?   r   r   <module>rB      so   $                  .; .; .; .; .; .; .; .; .; .;r   