a
    Ã&Ïh²
  ã                   @   s*   d dl mZ ddlmZ G dd„ dƒZdS )é    )ÚOptionalé   )ÚCommandc                   @   sÀ   e Zd Zddœdd„Zeedœdd„ƒZeee dœdd„ƒZeedœd	d
„ƒZ	ee
e dœdd„ƒZeddœdd„Zddœdd„Zddœdd„Zddœdd„Zddœdd„Zddœdd„ZdS )ÚFedCMN)Úreturnc                 C   s
   || _ d S )N)Ú_driver)ÚselfÚdriver© r
   úd/var/www/html/swiplay.fr/scambot/venv/lib/python3.9/site-packages/selenium/webdriver/remote/fedcm.pyÚ__init__   s    zFedCM.__init__c                 C   s   | j  tj¡d  d¡S )zGets the title of the dialog.ÚvalueÚtitle©r   Úexecuter   ÚGET_FEDCM_TITLEÚget©r   r
   r
   r   r      s    zFedCM.titlec                 C   s   | j  tj¡d  d¡S )z Gets the subtitle of the dialog.r   Úsubtitler   r   r
   r
   r   r       s    zFedCM.subtitlec                 C   s   | j  tj¡ d¡S )z2Gets the type of the dialog currently being shown.r   )r   r   r   ÚGET_FEDCM_DIALOG_TYPEr   r   r
   r
   r   Údialog_type%   s    zFedCM.dialog_typec                 C   s   | j  tj¡ d¡S )z.Gets the list of accounts shown in the dialog.r   )r   r   r   ÚGET_FEDCM_ACCOUNT_LISTr   r   r
   r
   r   Úaccount_list*   s    zFedCM.account_list)Úindexr   c                 C   s   | j  tjd|i¡ dS )z,Selects an account from the dialog by index.ZaccountIndexN)r   r   r   ÚSELECT_FEDCM_ACCOUNT)r   r   r
   r
   r   Úselect_account/   s    zFedCM.select_accountc                 C   s   | j  tjddi¡ dS )z)Clicks the continue button in the dialog.ZdialogButtonZConfirmIdpLoginContinueN)r   r   r   ÚCLICK_FEDCM_DIALOG_BUTTONr   r
   r
   r   Úaccept3   s    zFedCM.acceptc                 C   s   | j  tj¡ dS )z#Cancels/dismisses the FedCM dialog.N)r   r   r   ÚCANCEL_FEDCM_DIALOGr   r
   r
   r   Údismiss7   s    zFedCM.dismissc                 C   s   | j  tjddi¡ dS )z1Re-enables the promise rejection delay for FedCM.ÚenabledTN©r   r   r   ÚSET_FEDCM_DELAYr   r
   r
   r   Úenable_delay;   s    zFedCM.enable_delayc                 C   s   | j  tjddi¡ dS )z/Disables the promise rejection delay for FedCM.r    FNr!   r   r
   r
   r   Údisable_delay?   s    zFedCM.disable_delayc                 C   s   | j  tj¡ dS )z@Resets the FedCM dialog cooldown, allowing immediate retriggers.N)r   r   r   ÚRESET_FEDCM_COOLDOWNr   r
   r
   r   Úreset_cooldownC   s    zFedCM.reset_cooldown)Ú__name__Ú
__module__Ú__qualname__r   ÚpropertyÚstrr   r   r   r   ÚlistÚdictr   Úintr   r   r   r#   r$   r&   r
   r
   r
   r   r      s   r   N)Útypingr   Úcommandr   r   r
   r
   r
   r   Ú<module>   s   