
    DIe                     h    d Z ddlmZ ddlmZ dee         fdZdded	ed
dfdZdededed
dfdZ	dS )zHandles all display/view logic.    )Sequence   )ChannelNoticechannel_noticesc                     d}| D ]^}||j         k    r4t                       d}|d|j          dz  }t          |           |j         }t          |           t                       _dS )z
    Accepts a list of channel notice responses and prints a display.

    Args:
        channel_notices: A sequence of ChannelNotice objects.
    NChannelz "z" has the following notices:)channel_nameprintprint_notice_message)r   current_channelchannel_noticechannel_headers       3lib/python3.11/site-packages/conda/notices/views.pyprint_noticesr   	   s     O) 
 
n999GGG&NN^0NNNN .!!!,9O^,,,
 
      noticeindentreturnNc                 ~    | j         r	| j         dnd}d| j         d| }t          | | d| | j                    dS )zPrints a single channel notice.z%c [z] -- 
N)
created_atlevelr
   message)r   r   	timestampr   s       r   r   r      sb    -3->F6$)))BI...9..E	V
6U
6
6f
6fn
6
677777r   total_noticesdisplayed_noticesviewed_noticesc                 p    | |z
  |z
  }|dk    r'|dk    rd| d}nd| d}t          | d           dS dS )	zNConditionally shows a message informing users how many more message there are.r   r   z
There are z' more messages. To retrieve them run:

z	There is z$ more message. To retrieve it run:

zconda notices
N)r
   )r   r   r    notices_not_shownmsgs        r   print_more_notices_messager$   (   st     &69JJ1q  [0[[[CCW/WWWC%%%&&&&& r   )r   )
__doc__typingr   typesr   r   strr   intr$    r   r   <module>r+      s    & %                  8M#:    ,8 8 8 8t 8 8 8 8''+.'@C'	' ' ' ' ' 'r   