import EventEmitter from "eventemitter3" ; let __emitter = null , __busyMessage = null ; export function getBusyState ( ) { return __busyMessage ; } export function getEmitter ( ) { if ( ! __emitter ) { __emitter = new EventEmitter ( ) ; } return __emitter ; } export function setBusyState ( message ) { __busyMessage = message ; getEmitter ( ) . emit ( "change" , __busyMessage ) ; }