
    Yi                     |    S r SSKJrJrJr  SSKJr  SSKJr  SSK	J
r
  SSKJr  \(       a  SSKJr   " S S	\5      rg
)zRThis module contains the class that represent a Telegram InlineQueryResultsButton.    )TYPE_CHECKINGFinalOptional)	constants)TelegramObject)JSONDict)
WebAppInfo)Botc                      ^  \ rS rSr% SrSr  SSS.S\S\\   S\\   S	\\	   4U 4S
 jjjjr
\ SS\\	   S\S   S\S    4U 4S jjj5       r\R                  R                  r\\   \S'    \R                  R&                  r\\   \S'   SrU =r$ )InlineQueryResultsButton    a
  This object represents a button to be shown above inline query results. You **must** use
exactly one of the optional fields.

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

Args:
    text (:obj:`str`): Label text on the button.
    web_app (:class:`telegram.WebAppInfo`, optional): Description of the
        `Web App <https://core.telegram.org/bots/webapps>`_ that will be launched when the
        user presses the button. The Web App will be able to switch back to the inline mode
        using the method
        `switchInlineQuery <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_
        inside the Web App.
    start_parameter (:obj:`str`, optional):  Deep-linking parameter for the
        :guilabel:`/start` message sent to the bot when user presses the switch button.
        :tg-const:`telegram.InlineQuery.MIN_SWITCH_PM_TEXT_LENGTH`-
        :tg-const:`telegram.InlineQuery.MAX_SWITCH_PM_TEXT_LENGTH` characters,
        only ``A-Z``, ``a-z``, ``0-9``, ``_`` and ``-`` are allowed.

        Example:
            An inline bot that sends YouTube videos can ask the user to connect the bot to
            their YouTube account to adapt search results accordingly. To do this, it displays
            a 'Connect your YouTube account' button above the results, or even before showing
            any. The user presses the button, switches to a private chat with the bot and, in
            doing so, passes a start parameter that instructs the bot to return an OAuth link.
            Once done, the bot can offer a switch_inline button so that the user can easily
            return to the chat where they wanted to use the bot's inline capabilities.

Attributes:
    text (:obj:`str`): Label text on the button.
    web_app (:class:`telegram.WebAppInfo`): Optional. Description of the
        `Web App <https://core.telegram.org/bots/webapps>`_ that will be launched when the
        user presses the button. The Web App will be able to switch back to the inline mode
        using the method ``web_app_switch_inline_query`` inside the Web App.
    start_parameter (:obj:`str`): Optional. Deep-linking parameter for the
        :guilabel:`/start` message sent to the bot when user presses the switch button.
        :tg-const:`telegram.InlineQuery.MIN_SWITCH_PM_TEXT_LENGTH`-
        :tg-const:`telegram.InlineQuery.MAX_SWITCH_PM_TEXT_LENGTH` characters,
        only ``A-Z``, ``a-z``, ``0-9``, ``_`` and ``-`` are allowed.

)start_parametertextweb_appN
api_kwargsr   r   r   r   c                   > [         TU ]  US9  Xl        X l        X0l        U R                  U R                  U R                  4U l        U R                  5         g )Nr   )super__init__r   r   r   	_id_attrs_freeze)selfr   r   r   r   	__class__s        T/app/.venv/lib/python3.13/site-packages/telegram/_inline/inlinequeryresultsbutton.pyr   !InlineQueryResultsButton.__init__N   sN     	J/ 	 .5.=))T\\43G3GH    databotr
   returnc                    > U(       d  g[         R                  " UR                  S5      U5      US'   [        TU ]  XS9$ )z,See :meth:`telegram.TelegramObject.de_json`.Nr   )r   r   )r	   de_jsongetr   )clsr   r   r   s      r   r!    InlineQueryResultsButton.de_jsonc   s;    
 $,,TXXi-@#FYwD22r   MIN_START_PARAMETER_LENGTHMAX_START_PARAMETER_LENGTH)r   r   r   r   )NN)N)__name__
__module____qualname____firstlineno____doc__	__slots__strr   r	   r   r   classmethodr!   r   InlineQueryResultsButtonLimitr%   r   int__annotations__r&   __static_attributes____classcell__)r   s   @r   r   r       s    )V 7I
 )-)-	 *. *% "#	 X& * >B	3H%	3,4UO	3	,	-	3 	3 	//JJ c
  _//JJ c
  _r   r   N)r+   typingr   r   r   telegramr   telegram._telegramobjectr   telegram._utils.typesr   telegram._webappinfor	   r
   r    r   r   <module>r:      s3   & Y 1 1  3 * +V_~ V_r   