import { IStatus } from "../../../@types/helper" ; /**
 * Status
 */ export const Status = { addStatus : ( title , html ? , prepend ? ) : PromiseLike < string > => { return new Promise ( ( resolve , reject ) => { Status . load ( ) . then ( ( ) => { resolve ( window [ "SP" ] . UI . Status . addStatus ( title , html , prepend ) ) ; } ) ; } ) ; } , appendStatus : ( id , title , html ? ) : PromiseLike < string > => { return new Promise ( ( resolve , reject ) => { Status . load ( ) . then ( ( ) => { resolve ( window [ "SP" ] . UI . Status . appendStatus ( id , title , html ) ) ; } ) ; } ) ; } , load : ( ) : PromiseLike < void > => { return new Promise ( ( resolve , reject ) => { if ( window [ "SP" ] && window [ "SP" ] . UI && window [ "SP" ] . UI . Status ) { resolve ( ) ; } else { window [ "SP" ] . SOD . executeFunc ( "sp.js" , "SP.UI.Status" , ( ) => { resolve ( ) ; } ) ; } } ) ; } , removeAllStatus : ( hide ? ) => { Status . load ( ) . then ( ( ) => { window [ "SP" ] . UI . Status . removeAllStatus ( hide ) ; } ) ; } , removeStatus : ( id ) => { Status . load ( ) . then ( ( ) => { window [ "SP" ] . UI . Status . removeStatus ( id ) ; } ) ; } , setStatusPriColor : ( id , color ) => { Status . load ( ) . then ( ( ) => { window [ "SP" ] . UI . Status . setStatusPriColor ( id , color ) ; } ) ; } , updateStatus : ( id , html ) => { Status . load ( ) . then ( ( ) => { window [ "SP" ] . UI . Status . updateStatus ( id , html ) ; } ) ; } } ;