o
    "h                     @   sx   d Z ddlmZ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r2d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Optional)	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e f fdd	Z	e
dd
ede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__ I/var/www/html/venv/lib/python3.10/site-packages/telegram/_chatlocation.pyr   8   s
   
zChatLocation.__init__databotr
   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	   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   r   telegramr   telegram._files.locationr   telegram._telegramobjectr   telegram._utils.argumentparsingr   telegram._utils.typesr	   r
   r   r   r   r   r   <module>   s   