
    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            )       0   \ rS rSr                 SSSS\S\\   S\S   S	\\S
      S\\   S\\   S\S   S\\\	\\4         S\\\	\\4         S\\\	\\4         S\\   S\\   S\\   S\\   S\\   S\\   S\\   S\\   S\4(S jjr
Srg)
EditFolder   Nselfzpyrogram.Client	folder_idname
parse_modezenums.ParseModeentitiesztypes.MessageEntityanimate_custom_emojiiconcolorzenums.FolderColorpinned_chatsincluded_chatsexcluded_chatsexclude_mutedexclude_readexclude_archivedinclude_contactsinclude_non_contactsinclude_botsinclude_groupsinclude_channelsreturnc                   #    U R                  [        R                  R                  R	                  5       5      I Sh  vN nUR
                   Vs/ s HJ  n[        U[        R                  R                  [        R                  R                  45      (       d  MH  UPML     nnSnU H  nUR                  U:X  d  M  SnM     U(       d  [        SU S35      e[        R                  " XX45      I Sh  vN R                  5       u  nnU=(       d    / nU=(       d    / nU	=(       d    / n	U
=(       d    / n
U R                  [        R                  R                  R                  U[        R                  R                  U[        R                  R!                  UUS9U Vs/ s H  nU R#                  U5      I Sh  vN PM     snU	 Vs/ s H  nU R#                  U5      I Sh  vN PM     snU
 Vs/ s H  nU R#                  U5      I Sh  vN PM     snUUUUUUUUU(       + UU(       a  UR$                  OSS9S95      I Sh  vN nU$  GNs  snf  GNa Ns  snf  N{s  snf  NYs  snf  N&7f)	a  Update chat folder.

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

Parameters:
    folder_id (``int``):
        Unique chat folder identifier, 2-255.

    name (``str``, *optional*):
        The text of the chat folder name, 1-12 characters without line feeds.

    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*):
        Special entities like bold, italic, etc. that appear in the folder name.

    animate_custom_emoji (``bool``, *optional*):
        True, if custom emoji in the name must be animated.

    icon (``str``, *optional*):
        The chosen icon for the chat folder.
        Pass None to leave the folder icon as default.

    color (:obj:`~pyrogram.enums.FolderColor`, *optional*)
        Pass :obj:`~pyrogram.enums.FolderColor` to set folder color.
        Can't be changed if folder tags are disabled or the current user doesn't have Telegram Premium subscription.

    is_shareable (``bool``, *optional*):
        True, if at least one link has been created for the folder.

    pinned_chats (List of :obj:`~pyrogram.types.Chat`, *optional*):
        The pinned chats in the folder.
        You can pass an ID (int), username (str) or phone number (str).
        There can be up to getOption("chat_folder_chosen_chat_count_max") pinned and always included non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium.

    included_chats (List of :obj:`~pyrogram.types.Chat`, *optional*):
        The always included chats in the folder.
        You can pass an ID (int), username (str) or phone number (str).
        There can be up to getOption("chat_folder_chosen_chat_count_max") pinned and always included non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium.

    excluded_chats (List of :obj:`~pyrogram.types.Chat`, *optional*):
        The always excluded chats in the folder.
        You can pass an ID (int), username (str) or phone number (str).
        There can be up to getOption("chat_folder_chosen_chat_count_max") always excluded non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium.

    exclude_muted (``bool``, *optional*):
        True, if muted chats need to be excluded.

    exclude_read (``bool``, *optional*):
        True, if read chats need to be excluded.

    exclude_archived (``bool``, *optional*):
        True, if archived chats need to be excluded.

    include_contacts (``bool``, *optional*):
        True, if contacts need to be included.

    include_non_contacts (``bool``, *optional*):
        True, if non-contact users need to be included.

    include_bots (``bool``, *optional*):
        True, if bots need to be included.

    include_groups (``bool``, *optional*):
        True, if basic groups and supergroups need to be included.

    include_channels (``bool``, *optional*):
        True, if channels need to be included.

Returns:
    ``bool``: True, on success.

Example:
    .. code-block:: python

        # Update folder
        await app.edit_folder(folder_id, name="New folder title", included_chats=["me"])
NFTzFolder with id z
 not found)textr   )idtitlepinned_peersinclude_peersexclude_peerscontactsnon_contactsgroups
broadcastsbotsr   r   r   title_noanimateemoticonr   )r#   filter)invoker   	functionsmessagesGetDialogFiltersfilters
isinstancer   DialogFilterDialogFilterChatlistr#   
ValueErrorr	   parse_text_entitiesvaluesUpdateDialogFilterTextWithEntitiesresolve_peervalue)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   dialog_filtersfolderraw_foldersis_folder_existstitle_entitiespeerrs                             O/app/mltbenv/lib/python3.13/site-packages/pyrogram/methods/chats/edit_folder.pyedit_folderEditFolder.edit_folder   s^    J  ${{3==+A+A+R+R+TUU "0!7!7
!7v&399#9#9399;Y;Y"Z[ !7 	 

 !!FyyI%#'  "  ykDEE&+&?&?J&a aiikn'-2#)r'-2'-2++MM""55yy-- ))44!!/ 5  %1"$0D #//555$0" %3#$2D #//555$2# %3#$2D #//555$2# .!5)/%"/!-%5(<$<!).%++D9 .  6  "
 "
H w V
 !b" 6"
 6#
 6##"
s   ;I-II-AII!I-<6I-2I3B+I-I8I9II-I!I"I*I-0I&
I$ I&1I-I+I-I-II-II-$I&&I- )NNNNNNNNNNNNNNNNN)__name__
__module____qualname____firstlineno__intr   strr   boolr   rG   __static_attributes__rI       rF   r   r      s    #26:>/3"/38<:>:>(,'++/+//3'+)-+/'``` sm` ./	`
 4 567` 'tn` sm` +,` tE#s(O45` !eCHo!67` !eCHo!67`  ~` tn` #4.` #4.`  'tn!`" tn#`$ !%`& #4.'`( 
)` `rR   r   )
typingr   r   r   pyrogramr   r   r   r	   r   rI   rR   rF   <module>rU      s"   & ) (  - -a arR   