
    wg                     \    d dl mZ d dlmZ  G d d          Z e            fdedefdZdS )	    )NotificationRepositoryInterface)get_notification_repositoryc                   .    e Zd ZdeddfdZdedefdZdS )FormatNotificationnotification_repositoryreturnNc                     || _         d S )Nr   )selfr   s     H/var/www/html/cms/application/usecases/formatters/format_notification.py__init__zFormatNotification.__init__   s    '>$$$    notification_idc                 p   | j                             |          }|j        }| j                             |          }|D ]w}|j        rLd}|j        r,|j                                        r|j        }nd|j         d}d|j         d| d|j         d}n|j        }|                    |j	        |          }x|S )N "z<a class="ref" onclick="(z)">z</a>)
r   getmessageget_patternsmethodargisdigittextreplacetag)r   r   notificationnotification_textpatternspatternr   strings           r   __call__zFormatNotification.__call__   s    377HH(0/<<_MM 	O 	OG~ 
&; 5{**,, 5%k4GK444cgnccsccw|ccc  1 9 9'+v N N  r   )__name__
__module____qualname__r   r   intstrr"    r   r   r   r      sZ        ?0O ?TX ? ? ? ?! ! ! ! ! ! ! !r   r   notifications_repositoryr   c                 "    t          |           S )Nr
   )r   )r)   s    r   get_format_notificationr+   $   s     6NOOOOr   N)$domain.user.notifications.repositoryr   ?infrastructure.persistence.repositories.notification_repositoryr   r   r+   r(   r   r   <module>r.      s    P P P P P P     
! ! ! ! ! ! ! !< A\@[@]@]P P=PP P P P P Pr   