Ë
    Fü´jP  ã                  ón   — d Z ddlmZ ddlmZ ddlmZ ddlmZm	Z	 ddl
mZ erddlZ G d„ d	eee	«      Zy)
zProvide the ModNote class.é    )Úannotations)ÚTYPE_CHECKING)ÚAPI_PATH)ÚDynamicAttributesÚPRAWBase)ÚCreatedMixinNc                  óX   ‡ — e Zd ZU dZdZded<   ded<   ded<   dˆ fd	„Zdd
„Zdd„Zˆ xZ	S )ÚModNotea—  Represent a moderator note.

    .. include:: ../../typical_attributes.rst

    =============== ====================================================================
    Attribute       Description
    =============== ====================================================================
    ``action``      If this note represents a moderator action, this field indicates the
                    type of action. For example, ``"banuser"`` if the action was banning
                    a user.
    ``created_at``  Time the moderator note was created, represented in `Unix Time`_.
    ``description`` If this note represents a moderator action, this field indicates the
                    description of the action. For example, if the action was banning
                    the user, this is the ban reason.
    ``details``     If this note represents a moderator action, this field indicates the
                    details of the action. For example, if the action was banning the
                    user, this is the duration of the ban.
    ``id``          The ID of the moderator note.
    ``label``       The label applied to the note, currently one of:
                    ``"ABUSE_WARNING"``, ``"BAN"``, ``"BOT_BAN"``, ``"HELPFUL_USER"``,
                    ``"PERMA_BAN"``, ``"SOLID_CONTRIBUTOR"``, ``"SPAM_WARNING"``,
                    ``"SPAM_WATCH"``, or ``None``.
    ``moderator``   The moderator who created the note.
    ``note``        The text of the note.
    ``reddit_id``   The fullname of the object this note is attributed to, or ``None``
                    if not set. If this note represents a moderators action, this is the
                    fullname of the object the action was performed on.
    ``subreddit``   The subreddit this note belongs to.
    ``type``        The type of note, currently one of: ``"APPROVAL"``, ``"BAN"``,
                    ``"CONTENT_CHANGE"``, ``"INVITE"``, ``"MUTE"``, ``"NOTE"``,
                    ``"REMOVAL"``, or ``"SPAM"``.
    ``user``        The redditor the note is for.
    =============== ====================================================================

    .. _unix time: https://en.wikipedia.org/wiki/Unix_time

    Ú
created_atÚstrÚidzpraw.models.SubredditÚ	subredditzpraw.models.RedditorÚuserc                ó¾   •— t        || j                  «      r| j                  |j                  k(  S t        |t        «      r| j                  |k(  S t        ‰| �  |«      S )z5Return whether the other instance equals the current.)Ú
isinstanceÚ	__class__r   r   ÚsuperÚ__eq__)ÚselfÚotherr   s     €úR/root/workspace/ytshorts/venv/lib/python3.12/site-packages/praw/models/mod_note.pyr   zModNote.__eq__<   sL   ø€ ä�e˜TŸ^™^Ô,Ø—7‘7˜eŸh™hÑ&Ð&Ü�eœSÔ!Ø—7‘7˜eÑ#Ð#Ü‰w‰~˜eÓ$Ð$ó    c                ól   — t        | j                  j                  «      t        | j                  «      z  S )z(Return the hash of the current instance.)Úhashr   Ú__name__r   )r   s    r   Ú__hash__zModNote.__hash__D   s$   € ä�D—N‘N×+Ñ+Ó,¬t°D·G±G«}Ñ<Ð<r   c                ó¸   — | j                   t        | j                  «      t        | j                  «      dœ}| j                  j                  t        d   |¬«       y)zéDelete this note.

        For example, to delete the last note for u/spez from r/test, try:

        .. code-block:: python

            for note in reddit.subreddit("test").mod.notes("spez"):
                note.delete()

        )Únote_idr   r   Ú	mod_notes)ÚparamsN)r   r   r   r   Ú_redditÚdeleter   )r   r    s     r   r"   zModNote.deleteH   sG   € ð —w‘wÜ˜TŸ^™^Ó,Ü˜Ÿ	™	“Nñ(
ˆð
 	�‰×ÑœH [Ñ1¸&ÐÕAr   )r   zModNote | str | objectÚreturnÚbool)r#   Úint)r#   ÚNone)
r   Ú
__module__Ú__qualname__Ú__doc__Ú_created_at_attributeÚ__annotations__r   r   r"   Ú__classcell__)r   s   @r   r
   r
      s2   ø… ñ$ðL )ÐàƒGØ$Ó$Ø
Óõ%ó=÷Br   r
   )r)   Ú
__future__r   Útypingr   Úpraw.endpointsr   Úpraw.models.baser   r   Úpraw.models.reddit.mixinsr   Úpraw.modelsÚprawr
   © r   r   ú<module>r5      s2   ðÙ  å "å  å #ß 8Ý 2áÛôIBÐ ¨xõ IBr   