o
    ã?Hh”  ã                   @   s¦   d Z ddlmZ ddlmZ ddlmZ ddlmZ G dd„ deeeƒƒZ	G d	d
„ d
eeeƒƒZ
G dd„ deeeƒƒZG dd„ deeeƒƒZG dd„ deeeƒƒZdS )z linebot.models.rich_menu module.é    )ÚABCMeta)Úwith_metaclassé   )Ú
get_action)ÚBasec                       s&   e Zd ZdZ		d‡ fdd„	Z‡  ZS )ÚRichMenuz`RichMenu.

    https://developers.line.me/en/docs/messaging-api/reference/#rich-menu-object
    Nc           	         sd   t t| ƒjdi |¤Ž |  |t¡| _|| _|| _|| _g }|r-|D ]}| 	|  |t
¡¡ q!|| _dS )a2  __init__ method.

        :param size: size object which describe the rich menu displayed in the chat.
            Rich menu images must be one of the following sizes: 2500x1686, 2500x843.
        :type size: :py:class:`linebot.models.rich_menu.RichMenuSize`
        :param bool selected: true to display the rich menu by default. Otherwise, false.
        :param str name: Name of the rich menu.
            Maximum of 300 characters.
        :param str chatBarText: Text displayed in the chat bar.
                                Maximum of 14 characters.
        :param areas: Array of area objects which define coordinates and size of tappable areas.
                      Maximum of 20 area objects.
        :type areas: list[T <= :py:class:`linebot.models.rich_menu.RichMenuArea`]
        :param kwargs:
        N© )Úsuperr   Ú__init__Úget_or_new_from_json_dictÚRichMenuSizeÚsizeÚselectedÚnameÚchat_bar_textÚappendÚRichMenuAreaÚareas)	Úselfr   r   r   r   r   ÚkwargsÚ	new_areasÚarea©Ú	__class__r   úX/home/air/sanwanet/gpt-api/venv/lib/python3.10/site-packages/linebot/models/rich_menu.pyr
       s   
ÿ
zRichMenu.__init__)NNNNN©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   Ú__classcell__r   r   r   r   r      s
    ÿr   c                       ó"   e Zd ZdZd‡ fdd„	Z‡  ZS )r   z_RichMenuSize.

    https://developers.line.me/en/docs/messaging-api/reference/#size-object
    Nc                    ó&   t t| ƒjdi |¤Ž || _|| _dS )zÁ__init__ method.

        :param int width: Width of the rich menu. Must be 2500.
        :param int height: Height of the rich menu. Possible values: 1686, 843.
        :param kwargs:
        Nr   )r	   r   r
   ÚwidthÚheight)r   r#   r$   r   r   r   r   r
   G   s   
zRichMenuSize.__init__©NNr   r   r   r   r   r   A   ó    r   c                       r!   )r   z_RichMenuArea.

    https://developers.line.me/en/docs/messaging-api/reference/#area-object
    Nc                    s2   t t| ƒjdi |¤Ž |  |t¡| _t|ƒ| _dS )av  __init__ method.

        :param bounds: Object describing the boundaries of the area in pixels. See bounds object.
        :type bounds: :py:class:`linebot.models.rich_menu.RichMenuBound`
        :param action: Action performed when the area is tapped. See action objects.
        :type action: T <= :py:class:`linebot.models.actions.Action`
        :param kwargs:
        Nr   )r	   r   r
   r   ÚRichMenuBoundsÚboundsr   Úaction)r   r(   r)   r   r   r   r   r
   Z   s   	zRichMenuArea.__init__r%   r   r   r   r   r   r   T   r&   r   c                       r!   )r'   zcRichMenuBounds.

    https://developers.line.me/en/docs/messaging-api/reference/#bounds-object
    Nc                    s2   t t| ƒjdi |¤Ž || _|| _|| _|| _dS )a9  __init__ method.

        :param int x: Horizontal position relative to the top-left corner of the area.
        :param int y: Vertical position relative to the top-left corner of the area.
        :param int width: Width of the area.
        :param int height: Height of the area.
        :param kwargs:
        Nr   )r	   r'   r
   ÚxÚyr#   r$   )r   r*   r+   r#   r$   r   r   r   r   r
   o   s
   	
zRichMenuBounds.__init__)NNNNr   r   r   r   r   r'   i   r&   r'   c                       r!   )ÚRichMenuAliaszgRichMenuAlias.

    https://developers.line.biz/en/reference/messaging-api/#create-rich-menu-alias
    Nc                    r"   )a  __init__ method.

        :param string rich_menu_alias_id: Rich menu alias ID,
         which can be any ID, unique for each channel.
        :param string rich_menu_id: The rich menu ID to be associated with the rich menu alias.
        :param kwargs:
        Nr   )r	   r,   r
   Úrich_menu_alias_idÚrich_menu_id)r   r-   r.   r   r   r   r   r
   †   s   
zRichMenuAlias.__init__r%   r   r   r   r   r   r,   €   r&   r,   N)r   Úabcr   Úfuture.utilsr   Úactionsr   Úbaser   r   r   r   r'   r,   r   r   r   r   Ú<module>   s   '