
    YPi                         d Z ddl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 dd	lmZmZ erdd
lmZ  G d de
      Z G d de      Z G d de      Zy)zSThis module contains an objects that represents a InputProfilePhoto and subclasses.    N)TYPE_CHECKINGOptionalUnion)	constants)TelegramObject)enum)to_timedelta)parse_file_input)	FileInputJSONDict)	InputFilec                        e Zd ZdZej
                  j                  Z	 ej
                  j                  Z	 dZddde	de
e   f fdZ xZS )InputProfilePhotoaD  This object describes a profile photo to set. Currently, it can be one of

    * :class:`InputProfilePhotoStatic`
    * :class:`InputProfilePhotoAnimated`

    .. versionadded:: 22.1

    Args:
        type (:obj:`str`): Type of the profile photo.

    Attributes:
        type (:obj:`str`): Type of the profile photo.

    )typeN
api_kwargsr   r   c                    t         |   |       t        j                  t        j
                  ||      | _        | j                          y )Nr   )super__init__r   
get_memberr   InputProfilePhotoTyper   _freeze)selfr   r   	__class__s      W/root/twitch_bot/venv/lib/python3.12/site-packages/telegram/_files/inputprofilephoto.pyr   zInputProfilePhoto.__init__:   s9     	J/)H)H$PTU	    )__name__
__module____qualname____doc__r   r   STATICANIMATED	__slots__strr   r   r   __classcell__r   s   @r   r   r   #   s]     ,,33FR..77HTI *.			 X&		 	r   r   c                   <     e Zd ZdZdZdddedee   f fdZ xZ	S )InputProfilePhotoStatica  A static profile photo in the .JPG format.

    .. versionadded:: 22.1

    Args:
        photo (:term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes` |             :class:`pathlib.Path`): The static profile photo. |uploadinputnopath|

    Attributes:
        type (:obj:`str`): :tg-const:`telegram.constants.InputProfilePhotoType.STATIC`.
        photo (:class:`telegram.InputFile` | :obj:`str`): The static profile photo.

    )photoNr   r)   r   c                    t         |   t        j                  j                  |       | j                         5  t        |dd      | _        d d d        y # 1 sw Y   y xY wN)r   r   T)attach
local_mode)r   r   r   r   r!   	_unfrozenr
   r)   )r   r)   r   r   s      r   r   z InputProfilePhotoStatic.__init__W   sY     	i==DDQ[\^^ 	 1Adt1DJ	 	 	s   AA!)
r   r   r   r    r#   r   r   r   r   r%   r&   s   @r   r(   r(   F   s5     I *.	 X&	 r   r(   c            	       d     e Zd ZdZdZ	 d	dddedeeej                  df   de
e   f fdZ xZS )
InputProfilePhotoAnimatedab  An animated profile photo in the MPEG4 format.

    .. versionadded:: 22.1

    Args:
        animation (:term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes` |             :class:`pathlib.Path`): The animated profile photo. |uploadinputnopath|
        main_frame_timestamp (:class:`datetime.timedelta` | :obj:`int` | :obj:`float`, optional):
            Timestamp in seconds of the frame that will be used as the static profile photo.
            Defaults to ``0.0``.

    Attributes:
        type (:obj:`str`): :tg-const:`telegram.constants.InputProfilePhotoType.ANIMATED`.
        animation (:class:`telegram.InputFile` | :obj:`str`): The animated profile photo.
        main_frame_timestamp (:class:`datetime.timedelta`): Optional. Timestamp in seconds of the
            frame that will be used as the static profile photo. Defaults to ``0.0``.
    )	animationmain_frame_timestampNr   r1   r2   r   c                    t         |   t        j                  j                  |       | j                         5  t        |dd      | _        t        |      | _	        d d d        y # 1 sw Y   y xY wr+   )
r   r   r   r   r"   r.   r
   r1   r	   r2   )r   r1   r2   r   r   s       r   r   z"InputProfilePhotoAnimated.__init__{   so     	i==FFS]^^^ 	d 5E$45DN BNNbAcD%	d 	d 	ds   $A((A1)N)r   r   r   r    r#   r   r   floatdtm	timedeltar   r   r   r%   r&   s   @r   r0   r0   f   sa    $ 6I
 CGd
 *.dd $E3==$$>?d
 X&d dr   r0   )r    datetimer5   typingr   r   r   telegramr   telegram._telegramobjectr   telegram._utilsr   telegram._utils.argumentparsingr	   telegram._utils.filesr
   telegram._utils.typesr   r   r   r   r(   r0    r   r   <module>r@      sV   & Z  1 1  3   8 2 5"   F/ @$d 1 $dr   