o
    "h                     @   s   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
 ddlmZ ddlmZmZ G d	d
 d
eZG dd deZdS )zNThis module contains an objects that are related to Telegram input checklists.    )Sequence)Optional)MessageEntity)TelegramObject)parse_sequence_arg)DEFAULT_NONE)JSONDictODVInputc                       sV   e Zd ZdZdZedfdddededee de	e
e  d	e	e f
 fd
dZ  ZS )InputChecklistTaska?  
    Describes a task to add to a checklist.

    Objects of this class are comparable in terms of equality.
    Two objects of this class are considered equal if their :attr:`id` is equal.

    .. versionadded:: 22.3

    Args:
        id (:obj:`int`):
            Unique identifier of the task; must be positive and unique among all task identifiers
            currently present in the checklist.
        text (:obj:`str`):
            Text of the task;
            :tg-const:`telegram.constants.InputChecklistLimit.MIN_TEXT_LENGTH`-:tg-const:`telegram.constants.InputChecklistLimit.MAX_TEXT_LENGTH` characters after
            entities parsing.
        parse_mode (:obj:`str`, optional):
            |parse_mode|
        text_entities (Sequence[:class:`telegram.MessageEntity`], optional):
            List of special entities that appear in the text, which can be specified instead of
            parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and
            custom_emoji entities are allowed.

    Attributes:
        id (:obj:`int`):
            Unique identifier of the task; must be positive and unique among all task identifiers
            currently present in the checklist.
        text (:obj:`str`):
            Text of the task;
            :tg-const:`telegram.constants.InputChecklistLimit.MIN_TEXT_LENGTH`-:tg-const:`telegram.constants.InputChecklistLimit.MAX_TEXT_LENGTH` characters after
            entities parsing.
        parse_mode (:obj:`str`):
            Optional. |parse_mode|
        text_entities (Sequence[:class:`telegram.MessageEntity`]):
            Optional. List of special entities that appear in the text, which can be specified
            instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler,
            and custom_emoji entities are allowed.

    )id
parse_modetexttext_entitiesN
api_kwargsr   r   r   r   r   c                   s@   t  j|d || _|| _|| _t|| _| jf| _|   d S Nr   )	super__init__r   r   r   r   r   	_id_attrs_freeze)selfr   r   r   r   r   	__class__ K/var/www/html/venv/lib/python3.10/site-packages/telegram/_inputchecklist.pyr   P   s   	

zInputChecklistTask.__init__)__name__
__module____qualname____doc__	__slots__r   intstrr	   r   r   r   r   r   __classcell__r   r   r   r   r
      s$    *
r
   c                       sn   e Zd ZdZdZedddfdddedee de	e de
ee  d	e
e d
e
e de
e f fddZ  ZS )InputChecklistaw
  
    Describes a checklist to create.

    Objects of this class are comparable in terms of equality.
    Two objects of this class are considered equal if their :attr:`tasks` is equal.

    .. versionadded:: 22.3

    Args:
        title (:obj:`str`):
            Title of the checklist;
            :tg-const:`telegram.constants.InputChecklistLimit.MIN_TITLE_LENGTH`-:tg-const:`telegram.constants.InputChecklistLimit.MAX_TITLE_LENGTH` characters after
            entities parsing.
        parse_mode (:obj:`str`, optional):
            |parse_mode|
        title_entities (Sequence[:class:`telegram.MessageEntity`], optional):
            List of special entities that appear in the title, which
            can be specified instead of :paramref:`parse_mode`. Currently, only bold, italic,
            underline, strikethrough, spoiler, and custom_emoji entities are allowed.
        tasks (Sequence[:class:`telegram.InputChecklistTask`]):
            List of
            :tg-const:`telegram.constants.InputChecklistLimit.MIN_TASK_NUMBER`-:tg-const:`telegram.constants.InputChecklistLimit.MAX_TASK_NUMBER` tasks in
            the checklist.
        others_can_add_tasks (:obj:`bool`, optional):
            Pass :obj:`True` if other users can add tasks to the checklist.
        others_can_mark_tasks_as_done (:obj:`bool`, optional):
            Pass :obj:`True` if other users can mark tasks as done or not done in the checklist.

    Attributes:
        title (:obj:`str`):
            Title of the checklist;
            :tg-const:`telegram.constants.InputChecklistLimit.MIN_TITLE_LENGTH`-:tg-const:`telegram.constants.InputChecklistLimit.MAX_TITLE_LENGTH` characters after
            entities parsing.
        parse_mode (:obj:`str`):
            Optional. |parse_mode|
        title_entities (Sequence[:class:`telegram.MessageEntity`]):
            Optional. List of special entities that appear in the title, which
            can be specified instead of :paramref:`parse_mode`. Currently, only bold, italic,
            underline, strikethrough, spoiler, and custom_emoji entities are allowed.
        tasks (Sequence[:class:`telegram.InputChecklistTask`]):
            List of
            :tg-const:`telegram.constants.InputChecklistLimit.MIN_TASK_NUMBER`-:tg-const:`telegram.constants.InputChecklistLimit.MAX_TASK_NUMBER` tasks in
            the checklist.
        others_can_add_tasks (:obj:`bool`):
            Optional. Pass :obj:`True` if other users can add tasks to the checklist.
        others_can_mark_tasks_as_done (:obj:`bool`):
            Optional. Pass :obj:`True` if other users can mark tasks as done or not done in
            the checklist.

    )others_can_add_tasksothers_can_mark_tasks_as_doner   taskstitletitle_entitiesNr   r'   r&   r   r(   r$   r%   r   c                   sP   t  j|d || _t|| _|| _t|| _|| _|| _| jf| _	| 
  d S r   )r   r   r'   r   r&   r   r(   r$   r%   r   r   )r   r'   r&   r   r(   r$   r%   r   r   r   r   r      s   


zInputChecklist.__init__)r   r   r   r   r   r   r!   r   r
   r	   r   r   boolr   r   r"   r   r   r   r   r#   d   s0    7	
	r#   N)r   collections.abcr   typingr   telegram._messageentityr   telegram._telegramobjectr   telegram._utils.argumentparsingr   telegram._utils.defaultvaluer   telegram._utils.typesr   r	   r
   r#   r   r   r   r   <module>   s   F