o
    Zzj  ã                   @   st   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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)Ú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
 dB d	edB f
‡ fd
d„Z‡  ZS )ÚInputChecklistTaskaU  
    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,
            custom_emoji, and date_time 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,
            custom_emoji, and date_time 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__© úS/var/www/kodo/tsheker/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   Ú__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
 dB d	edB d
edB dedB f‡ fdd„Z‡  ZS )ÚInputChecklista“
  
    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, and date_time 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, and date_time 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   Úboolr   r   r!   r   r   r   r   r"   d   s0    7ù	÷þýü
ûúù	÷r"   N)r   Úcollections.abcr   Útelegram._messageentityr   Útelegram._telegramobjectr   Útelegram._utils.argumentparsingr   Útelegram._utils.defaultvaluer   Útelegram._utils.typesr   r   r	   r"   r   r   r   r   Ú<module>   s   F