o
    Zzjæ  ã                   @   st   d Z ddlmZm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r0ddlmZ G d	d
„ d
e	ƒZdS )zWThis module contains an object that represents a location to which a chat is connected.é    )ÚTYPE_CHECKINGÚFinal)Ú	constants)ÚLocation)ÚTelegramObject)Úde_json_optional)ÚJSONDict)ÚBotc                       sˆ   e Zd ZU dZdZddœdedededB f‡ fdd	„Ze	dd
edddd f‡ fdd„ƒZ
ejjZee ed< 	 ejjZee ed< ‡  ZS )ÚChatLocationa¦  This object represents a location to which a chat is connected.

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

    Args:
        location (:class:`telegram.Location`): The location to which the supergroup is connected.
            Can't be a live location.
        address (:obj:`str`): Location address;
            :tg-const:`telegram.ChatLocation.MIN_ADDRESS`-
            :tg-const:`telegram.ChatLocation.MAX_ADDRESS` characters, as defined by the chat owner.
    Attributes:
        location (:class:`telegram.Location`): The location to which the supergroup is connected.
            Can't be a live location.
        address (:obj:`str`): Location address;
            :tg-const:`telegram.ChatLocation.MIN_ADDRESS`-
            :tg-const:`telegram.ChatLocation.MAX_ADDRESS` characters, as defined by the chat owner.

    )ÚaddressÚlocationN©Ú
api_kwargsr   r   r   c                   s0   t ƒ j|d� || _|| _| jf| _|  ¡  d S )Nr   )ÚsuperÚ__init__r   r   Ú	_id_attrsÚ_freeze)Úselfr   r   r   ©Ú	__class__© úQ/var/www/kodo/tsheker/venv/lib/python3.10/site-packages/telegram/_chatlocation.pyr   8   s
   
zChatLocation.__init__ÚdataÚbotz
Bot | NoneÚreturnc                    s0   |   |¡}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   G   s   
zChatLocation.de_jsonÚMIN_ADDRESSÚMAX_ADDRESS)N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   Ústrr   r   Úclassmethodr   r   ÚLocationLimitÚMIN_CHAT_LOCATION_ADDRESSr   r   ÚintÚ__annotations__ÚMAX_CHAT_LOCATION_ADDRESSr    Ú__classcell__r   r   r   r   r
   !   s"   
 ûþýûr
   N)r$   Útypingr   r   Útelegramr   Útelegram._files.locationr   Útelegram._telegramobjectr   Útelegram._utils.argumentparsingr   Útelegram._utils.typesr   r	   r
   r   r   r   r   Ú<module>   s   