
    e                     f    d dl Z d dlmZ d dlmZ d dlmZmZ d dlm	Z	 d dl
mZ d Zd Zd	 Zd
 ZdS )    N)config)NotificationArea)
set_curdocstate)VanillaTemplate)Buttonc                    t          j        d          5  t                      }d d d            n# 1 swxY w Y   t          |j        t
                    sJ |                    |            t          j        	                                fd| _
        t          |           5  t          j        |j        u sJ 	 d d d            d S # 1 swxY w Y   d S )NTnotificationsc                       S N session_contexts   >lib/python3.11/site-packages/panel/tests/template/test_base.py<lambda>z9test_notification_instantiate_on_config.<locals>.<lambda>            )r   setr   
isinstancer   r   
server_docunittestmockMock_session_contextr   r   documenttmplr   s     @r   'test_notification_instantiate_on_configr   
   sT   	$	'	'	' ! !  ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! d(*:;;;;;OOHm((**O 7 7 7 7H	H		 9 9"d&8888889 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9s   266%C		CCc                 n   t          t                                }t          |j        t                    sJ |                    |            t
          j                                        fd| _        t          |           5  t          j        |j        u sJ 	 d d d            d S # 1 swxY w Y   d S )Nr
   c                       S r   r   r   s   r   r   z,test_notification_explicit.<locals>.<lambda>   r   r   )r   r   r   r   r   r   r   r   r   r   r   r   s     @r   test_notification_explicitr"      s    )9););<<<Dd(*:;;;;;OOHm((**O 7 7 7 7H	H		 9 9"d&8888889 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9s   B**B.1B.c                     dgdgddiddid}t          d	i |}|j        j                                        }|d= ||k    sJ d S )
Nz"html { background-color: purple; }zstylesheet.cssfoozfoo.jsbarzbar.js)raw_css	css_filesjs_files
js_modulesnamer   )r   r   paramvalues)r   custom_configr   r   s       r   ,test_template_pass_config_params_constructorr.   %   ss    89&'H%h'	 M ++]++D[%%''Fv]""""""r   c                  L   t                      } t          dd          }| j                            |           | j                            |           t          | j                  dk    sJ dt          |           | j        v sJ dt          |           | j        v sJ d S )NzClick meprimary)r*   button_type   znav-zmain-)r   r   sidebarappendmainlen_render_itemsid)r   buttons     r   test_template_multi_refsr:   2   s    D;;;FLIVt!""a''''"V**$"444442f::4#5555555r   )r   panel.configr   panel.io.notificationsr   panel.io.stater   r   panel.templater   panel.widgetsr   r   r"   r.   r:   r   r   r   <module>r@      s           3 3 3 3 3 3 , , , , , , , , * * * * * *            9 9 9
9 
9 
9
# 
# 
#6 6 6 6 6r   