can('notification','read')) return;
	
	?>
	
	
	    
	    	
	    	{{created-relative}}
	    	{{label}}
	    	{{{html}}}
		 
		
	 
	login;
	}
	Notification::emit(
		array(
			'label' => "Nouvelle fonctionnalité de notification !",
			'html' => "Une nouvelle Notification 
			à été ajoutée à votre espace.
 Vous pouvez consulter toutes vos notifications ici et configurer vos préférences la.",
			'meta' => array(
				'link' => ROOT_URL.'/index.php?module=notification',
			)
		),$recipients
	);
}
//Fonction executée lors de la désactivation du plugin
function notification_uninstall($id){
	if($id != 'fr.idleman.notification') return;
	Entity::uninstall(__DIR__);
}
//Déclaration des sections de droits du plugin
function notification_section(&$sections){
	$sections['notification'] = "Gestion des droits sur le plugin notification";
}
//Cette fonction comprends toutes les actions
//du plugin qui ne nécessitent pas de vue html
function notification_action(){
	require_once(__DIR__.SLASH.'action.php');
}
//Déclaration du menu de réglages
function notification_menu_setting(&$settingMenu){
	global $_, $myUser;
	if(!$myUser->can('notification','configure')) return;
	$settingMenu[]= array(
		'sort' =>1,
		'url' => 'setting.php?section=notification',
		'icon' => 'fas fa-angle-right',
		'label' => 'Notifications'
	);
}
function notification_menu_account(&$accountMenu){
	global $_, $myUser;
	if(!$myUser->connected() || !$myUser->can('notification', 'read')) return;
	$accountMenu[]= array(
		'sort' =>0,
		'url' => 'account.php?section=notification',
		'icon' => 'fas fa-angle-right',
		'label' => 'Notifications',
	);	
}
//Déclaration des pages de réglages
function notification_content_setting(){
	global $_;
	if(file_exists(__DIR__.SLASH.'setting.'.$_['section'].'.php'))
		require_once(__DIR__.SLASH.'setting.'.$_['section'].'.php');
}
//Déclaration des pages de réglages
function notification_content_account(){
	global $_;
	if(file_exists(__DIR__.SLASH.'account.'.$_['section'].'.php'))
		require_once(__DIR__.SLASH.'account.'.$_['section'].'.php');
}
//Émission d'une notification
function notification_emit_notification($params, $recipients){
	require_once(__DIR__.SLASH.'Notification.class.php');
	Notification::emit($params,$recipients);
}
//Déclation des assets
Plugin::addCss("/css/main.css?v=1"); 
Plugin::addJs("/js/main.js?v=1"); 
//Mapping hook / fonctions
Plugin::addHook("install", "notification_install");
Plugin::addHook("uninstall", "notification_uninstall"); 
Plugin::addHook("section", "notification_section");
Plugin::addHook("login_header", "notification_menu"); 
Plugin::addHook("page", "notification_page");  
Plugin::addHook("action", "notification_action");
Plugin::addHook("menu_account", "notification_menu_account");
Plugin::addHook("content_account", "notification_content_account");
Plugin::addHook("menu_setting", "notification_menu_setting");    
Plugin::addHook("content_setting", "notification_content_setting");    
 
Plugin::addHook("emit_notification", "notification_emit_notification");
?>