
    il                     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            '       $   \ rS rSr                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)CreateFolder   Nselfzpyrogram.Client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 HT  n[        U[        R                  R                  [        R                  R                  45      (       d  MH  UR                  PMV     nn[        SS5       H  nU[        U5      ;  d  M  Un  O   [        R                  " XX#5      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!                  W[        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   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  Create new chat folder.

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

Parameters:
    name (``str``):
        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:
    ``int``: On success, folder id is returned.

Example:
    .. code-block:: python

        # Create folder
        await app.create_folder(name="New folder", included_chats=["me"])
N      )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$   rangesetr	   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   dialog_filtersfolderraw_folders_idsi	folder_idtitle_entitiesuser_ids                            Q/app/mltbenv/lib/python3.13/site-packages/pyrogram/methods/chats/create_folder.pycreate_folderCreateFolder.create_folder   sT    B  ${{3==+A+A+R+R+TUU %3$:$:
$:&&399#9#9399;Y;Y"Z[ FII$: 	 
 q#AO,,	 
 ',&?&?J&a aiikn'-2#)r'-2'-2kkMM""55yy-- ))44!!/ 5  (4"'3G #//888'3" (6#'5G #//888'5# (6#'5G #//888'5# .!5)/%"/!-%5(<$<!).%++D9 .  6  "
 "	
 "	
H q V
 !b" 9"
 9#
 9##"	
s   ;I(II(AI	I	+I( I(-I.B+I(I3I4I<I(III%I(+I!I I!1I(?I& I(	I(II(II(I!!I( )NNNNNNNNNNNNNNNN)__name__
__module____qualname____firstlineno__strr   r   boolr   intrI   __static_attributes__rK       rH   r   r      s    37:>/3"/38<:>:>(,'++/+//3'+)-+/%YYY ./Y 4 567	Y
 'tnY smY +,Y tE#s(O45Y !eCHo!67Y !eCHo!67Y  ~Y tnY #4.Y #4.Y 'tnY  tn!Y" !#Y$ #4.%Y& 
'Y YrT   r   )
typingr   r   r   pyrogramr   r   r   r	   r   rK   rT   rH   <module>rW      s"   & ) (  - -Z ZrT   