
    i                     L    S SK JrJrJr  S SKrS SKJrJrJrJr   " S S5      r	g)    )ListOptionalUnionN)enumsrawtypesutilsc                       \ rS rSr     SSSS\\\4   S\S\\   S\S	   S
\\S      S\\	   S\\	   S\S   4S jjr
Srg)SendGift   Nselfzpyrogram.Clientchat_idgift_idtext
parse_modezenums.ParseModeentitiesztypes.MessageEntity
is_privatepay_for_upgradereturnztypes.Messagec                   #    [         R                  " XXE5      I Sh  vN R                  5       u  p5[        R                  R                  U R                  U5      I Sh  vN UUUU(       a&  [        R                  R                  X5=(       d    / S9OSS9nU R                  [        R                  R                  R                  U R                  [        R                  R                  R                  US95      I Sh  vN R                  US95      I Sh  vN n	[         R                  " X	R                  5      I Sh  vN n
U
(       a  U
S   $ S$  GN5 N NX NA N7f)aX  Send a gift to another user or channel chat. May return an error with a message "STARGIFT_USAGE_LIMITED" if the gift was sold out.

.. include:: /_includes/usable-by/users-bots.rst

Parameters:
    chat_id (``int`` | ``str``):
        Unique identifier (int) or username (str) of the target chat.
        For your personal cloud (Saved Messages) you can simply use "me" or "self".
        For a contact that exists in your Telegram address book you can use his phone number (str).

    gift_id (``int``):
        Unique identifier of star gift.
        To get all available star gifts use :meth:`~pyrogram.Client.get_available_gifts`.

    text (``str``, *optional*):
        Text that will be shown along with the gift, 0-128 characters.

    parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*):
        By default, texts are parsed using both Markdown and HTML styles.
        You can combine both syntaxes together.

    entities (List of :obj:`~pyrogram.types.MessageEntity`, *optional*):
        List of special entities that appear in message text, which can be specified instead of *parse_mode*.

    is_private (``bool``, *optional*):
        Pass True to show gift text and sender only to the gift receiver. Otherwise, everyone will be able to see them.

    pay_for_upgrade (``bool``, *optional*):
        Pass True to additionally pay for the gift upgrade and allow the receiver to upgrade it for free.

Returns:
    :obj:`~pyrogram.types.Message`: On success, the sent message is returned.

Example:
    .. code-block:: python

        # Send gift
        await app.send_gift(chat_id=chat_id, gift_id=123)
N)r   r   )peerr   	hide_nameinclude_upgrademessage)invoice)form_idr   r   )r	   parse_text_entitiesvaluesr   r   InputInvoiceStarGiftresolve_peerTextWithEntitiesinvoke	functionspaymentsSendStarsFormGetPaymentFormr   parse_messagesupdates)r   r   r   r   r   r   r   r   r   rmessagess              P/app/mltbenv/lib/python3.13/site-packages/pyrogram/methods/payments/send_gift.py	send_giftSendGift.send_gift   s*    b !& 9 9$j [[cce))00((11 +VZCII..D>r.R`d 1 
 ++MM""00#{{MM**99 ' :    7 1 	
 	
 --dII>>&x{0D0/ \ 2	
 ?sY   EEAEE BE>E?EE'E?E EEEEE )NNNNN)__name__
__module____qualname____firstlineno__r   intstrr   r   boolr,   __static_attributes__r.       r+   r   r      s    
 #26:>%)*.H1H1sCxH1 H1 sm	H1
 ./H1 4 567H1 TNH1 "$H1 
/	"H1 H1r7   r   )
typingr   r   r   pyrogramr   r   r   r	   r   r.   r7   r+   <module>r:      s"   ( ) (  - -I1 I1r7   