o
    Zzj/  ã                   @   sd   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d
S )zLThis module contains an object that represents a Telegram UserProfilePhotos.é    )ÚSequence)ÚTYPE_CHECKING)Ú	PhotoSize)ÚTelegramObject)ÚJSONDict)ÚBotc                       sd   e Zd ZdZdZddœdedee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 )ÚUserProfilePhotosa.  This object represents a user's profile pictures.

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

    Args:
        total_count (:obj:`int`): Total number of profile pictures the target user has.
        photos (Sequence[Sequence[:class:`telegram.PhotoSize`]]): Requested profile pictures (in up
            to 4 sizes each).

            .. versionchanged:: 20.0
                |sequenceclassargs|

    Attributes:
        total_count (:obj:`int`): Total number of profile pictures.
        photos (tuple[tuple[:class:`telegram.PhotoSize`]]): Requested profile pictures (in up to 4
            sizes each).

            .. versionchanged:: 20.0
                |tupleclassattrs|

    )ÚphotosÚtotal_countN©Ú
api_kwargsr
   r	   r   c                   sB   t ƒ j|d� || _tdd„ |D ƒƒ| _| j| jf| _|  ¡  d S )Nr   c                 s   s   � | ]}t |ƒV  qd S ©N)Útuple)Ú.0Úsizes© r   úV/var/www/kodo/tsheker/venv/lib/python3.10/site-packages/telegram/_userprofilephotos.pyÚ	<genexpr>D   s   € z-UserProfilePhotos.__init__.<locals>.<genexpr>)ÚsuperÚ__init__r
   r   r	   Ú	_id_attrsÚ_freeze)Úselfr
   r	   r   ©Ú	__class__r   r   r   :   s
   zUserProfilePhotos.__init__ÚdataÚbotz
Bot | NoneÚreturnc                    s4   |   |¡}‡ fdd„|d D ƒ|d< tƒ j|ˆ d�S )z,See :meth:`telegram.TelegramObject.de_json`.c                    s   g | ]}t  |ˆ ¡‘qS r   )r   Úde_list)r   Úphoto©r   r   r   Ú
<listcomp>O   s    z-UserProfilePhotos.de_json.<locals>.<listcomp>r	   )r   r   )Ú_parse_datar   Úde_json)Úclsr   r   r   r    r   r#   J   s   
zUserProfilePhotos.de_jsonr   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__Úintr   r   r   r   Úclassmethodr#   Ú__classcell__r   r   r   r   r       s    ûþ
ýû&r   N)r(   Úcollections.abcr   Útypingr   Útelegram._files.photosizer   Útelegram._telegramobjectr   Útelegram._utils.typesr   Útelegramr   r   r   r   r   r   Ú<module>   s   