
    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   Accountc                       e Zd ZdZdZdZddZedee	         fd            Z
ede	fd            Zedee	         fd	            Zdee         fd
ZdeddfdZddZddZdS )Dialogz6Represents a FedCM dialog that can be interacted with.AccountChooserAutoReauthnreturnNc                     || _         d S )N)_driver)selfdrivers     r/var/www/html/nodeJS/PythonScripts/venv3.11/lib/python3.11/site-packages/selenium/webdriver/common/fedcm/dialog.py__init__zDialog.__init__   s        c                 $    | j         j        j        S )z2Gets the type of the dialog currently being shown.)r   fedcmdialog_typer   s    r   typezDialog.type!   s     |!--r   c                 $    | j         j        j        S )zGets the title of the dialog.)r   r   titler   s    r   r   zDialog.title&   s     |!''r   c                 V    | j         j        j        }|r|                    d          ndS )z Gets the subtitle of the dialog.subtitleN)r   r   r   get)r   results     r   r   zDialog.subtitle+   s-     #,)/9vzz*%%%T9r   c                 <    | j         j        j        }d |D             S )z.Gets the list of accounts shown in the dialog.c                 ,    g | ]}t          |          S  r   ).0accounts     r   
<listcomp>z'Dialog.get_accounts.<locals>.<listcomp>4   s     999W  999r   )r   r   account_list)r   accountss     r   get_accountszDialog.get_accounts1   s#    <%2999999r   indexc                 D    | j         j                            |           dS )z,Selects an account from the dialog by index.N)r   r   select_account)r   r(   s     r   r*   zDialog.select_account6   s!    ))%00000r   c                 B    | j         j                                         dS )z)Clicks the continue button in the dialog.N)r   r   acceptr   s    r   r,   zDialog.accept:   s    !!#####r   c                 B    | j         j                                         dS )zCancels/dismisses the dialog.N)r   r   dismissr   s    r   r.   zDialog.dismiss>   s    ""$$$$$r   )r   N)__name__
__module____qualname____doc__DIALOG_TYPE_ACCOUNT_LISTDIALOG_TYPE_AUTO_REAUTHr   propertyr   strr   r   r   r   r   r'   intr*   r,   r.   r!   r   r   r	   r	      s        @@/+    .hsm . . . X. (s ( ( ( X( :(3- : : : X:
:d7m : : : :
1C 1D 1 1 1 1$ $ $ $% % % % % %r   r	   N)typingr   r   r#   r   r	   r!   r   r   <module>r9      so   $                  (% (% (% (% (% (% (% (% (% (%r   