o
    Zzj/  ã                   @   st   d 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
 er(ddlmZ G dd	„ d	eƒZG d
d„ deƒZdS )zOThis module contains an object that represents a chat owner change in the chat.é    )ÚTYPE_CHECKING)ÚTelegramObject)ÚUser)Úde_json_optional)ÚJSONDict)ÚBotc                       sX   e Zd ZdZdZddœdededB f‡ fdd„Zedd	ed
ddd f‡ fdd„ƒZ	‡  Z
S )ÚChatOwnerChangeda²  This object represents a service message about an ownership change in the chat.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`new_owner` is equal.

    .. versionadded:: 22.7

    Args:
        new_owner (:class:`telegram.User`): The new owner of the chat

    Attributes:
        new_owner (:class:`telegram.User`): The new owner of the chat

    ©Ú	new_ownerN©Ú
api_kwargsr
   r   c                   ó*   t ƒ j|d� || _| jf| _|  ¡  d S ©Nr   ©ÚsuperÚ__init__r
   Ú	_id_attrsÚ_freeze©Úselfr
   r   ©Ú	__class__© úN/var/www/kodo/tsheker/venv/lib/python3.10/site-packages/telegram/_chatowner.pyr   2   ó   
zChatOwnerChanged.__init__ÚdataÚbotú
Bot | NoneÚreturnc                    ó0   |   |¡}t| d¡t|ƒ|d< tƒ j||d�S ©z,See :meth:`telegram.TelegramObject.de_json`.r
   )r   r   ©Ú_parse_datar   Úgetr   r   Úde_json©Úclsr   r   r   r   r   r$   ?   ó   
zChatOwnerChanged.de_json©N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   r   r   Úclassmethodr$   Ú__classcell__r   r   r   r   r       s    üþü&r   c                       s`   e Zd ZdZdZ	dddœdedB dedB f‡ fdd„Zedd	ed
ddd f‡ fdd„ƒZ	‡  Z
S )ÚChatOwnerLeftat  This object represents a service message about the chat owner leaving the chat.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`new_owner` is equal.

    .. versionadded:: 22.7

    Args:
        new_owner (:class:`telegram.User`, optional): The user who will become the new owner of the
            chat if the previous owner does not return to the chat

    Attributes:
        new_owner (:class:`telegram.User`): Optional. The user who will become the new owner of the
            chat if the previous owner does not return to the chat

    r	   Nr   r
   r   c                   r   r   r   r   r   r   r   r   ]   r   zChatOwnerLeft.__init__r   r   r   r   c                    r   r    r!   r%   r   r   r   r$   j   r'   zChatOwnerLeft.de_jsonr(   r)   r   r   r   r   r1   I   s    þüþü&r1   N)r-   Útypingr   Útelegram._telegramobjectr   Útelegram._userr   Útelegram._utils.argumentparsingr   Útelegram._utils.typesr   Útelegramr   r   r1   r   r   r   r   Ú<module>   s   )