import { INotify } from "../../../@types/helper" ; /**
 * Notification
 */ export const Notify = { addNotification : ( html , sticky ? ) : PromiseLike < string > => { return new Promise ( ( resolve , reject ) => { Notify . load ( ) . then ( ( ) => { resolve ( window [ "SP" ] . UI . Notify . addNotification ( html , sticky ) ) ; } ) ; } ) ; } , load : ( ) : PromiseLike < void > => { return new Promise ( ( resolve , reject ) => { if ( window [ "SP" ] && window [ "SP" ] . UI && window [ "SP" ] . UI . Notify ) { resolve ( ) ; } else { window [ "SP" ] . SOD . executeFunc ( "sp.js" , "SP.UI.Notify" , ( ) => { resolve ( ) ; } ) ; } } ) ; } , removeNotification : ( id ) => { Notify . load ( ) . then ( ( ) => { window [ "SP" ] . UI . Notify . removeNotification ( id ) ; } ) ; } } ;