
    ^j                     F    d dl mZ d dlmZmZ ddlmZ dZ G d de      Zy)	    )	timedelta)OptionalUnion   )SupportsCapabilitiesnewCommandTimeoutc                   `    e Zd Zedee   fd       Zej                  deee	f   ddfd       Zy)NewCommandTimeoutOptionreturnc                 L    | j                  t              }|dS t        |      S )zF
        The allowed time before seeing a new server command.
        N)seconds)get_capabilityNEW_COMMAND_TIMEOUTr   selfvalues     d/home/ubuntu/.local/lib/python3.12/site-packages/appium/options/common/new_command_timeout_option.pynew_command_timeoutz+NewCommandTimeoutOption.new_command_timeout   s)    
 ##$78}tB)E*BB    r   Nc                 z    | j                  t        t        |t              r|j	                                y|       y)z
        Set the allowed time before seeing a new server command.
        The value could either be provided as timedelta instance or an integer number of seconds.
        N)set_capabilityr   
isinstancer   total_secondsr   s     r   r   z+NewCommandTimeoutOption.new_command_timeout#   s/     	/*UZ\eJf1D1D1Frlqrr   )
__name__
__module____qualname__propertyr   r   r   setterr   int r   r   r
   r
      sX    CXi%8 C C sy#~)> s4 s  sr   r
   N)	datetimer   typingr   r   supports_capabilitiesr   r   r
   r    r   r   <module>r$      s%   $  " 7) s2 sr   