define(["exports","./events.js","./logger.js"],function(_exports,_events,_logger){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;var LoggingControl=function(){function LoggingControl(){babelHelpers.classCallCheck(this,LoggingControl)}return babelHelpers.createClass(LoggingControl,null,[{key:"forceGlobalTag",get:function(){return _logger.default.FORCE_GLOBAL_TAG},set:function(enable){_logger.default.FORCE_GLOBAL_TAG=enable,LoggingControl._notifyChange()}},{key:"globalTag",get:function(){return _logger.default.GLOBAL_TAG},set:function(tag){_logger.default.GLOBAL_TAG=tag,LoggingControl._notifyChange()}},{key:"enableAll",get:function(){return _logger.default.ENABLE_VERBOSE&&_logger.default.ENABLE_DEBUG&&_logger.default.ENABLE_INFO&&_logger.default.ENABLE_WARN&&_logger.default.ENABLE_ERROR},set:function(enable){_logger.default.ENABLE_VERBOSE=enable,_logger.default.ENABLE_DEBUG=enable,_logger.default.ENABLE_INFO=enable,_logger.default.ENABLE_WARN=enable,_logger.default.ENABLE_ERROR=enable,LoggingControl._notifyChange()}},{key:"enableDebug",get:function(){return _logger.default.ENABLE_DEBUG},set:function(enable){_logger.default.ENABLE_DEBUG=enable,LoggingControl._notifyChange()}},{key:"enableVerbose",get:function(){return _logger.default.ENABLE_VERBOSE},set:function(enable){_logger.default.ENABLE_VERBOSE=enable,LoggingControl._notifyChange()}},{key:"enableInfo",get:function(){return _logger.default.ENABLE_INFO},set:function(enable){_logger.default.ENABLE_INFO=enable,LoggingControl._notifyChange()}},{key:"enableWarn",get:function(){return _logger.default.ENABLE_WARN},set:function(enable){_logger.default.ENABLE_WARN=enable,LoggingControl._notifyChange()}},{key:"enableError",get:function(){return _logger.default.ENABLE_ERROR},set:function(enable){_logger.default.ENABLE_ERROR=enable,LoggingControl._notifyChange()}},{key:"getConfig",value:function(){return{globalTag:_logger.default.GLOBAL_TAG,forceGlobalTag:_logger.default.FORCE_GLOBAL_TAG,enableVerbose:_logger.default.ENABLE_VERBOSE,enableDebug:_logger.default.ENABLE_DEBUG,enableInfo:_logger.default.ENABLE_INFO,enableWarn:_logger.default.ENABLE_WARN,enableError:_logger.default.ENABLE_ERROR,enableCallback:_logger.default.ENABLE_CALLBACK}}},{key:"applyConfig",value:function(config){_logger.default.GLOBAL_TAG=config.globalTag,_logger.default.FORCE_GLOBAL_TAG=config.forceGlobalTag,_logger.default.ENABLE_VERBOSE=config.enableVerbose,_logger.default.ENABLE_DEBUG=config.enableDebug,_logger.default.ENABLE_INFO=config.enableInfo,_logger.default.ENABLE_WARN=config.enableWarn,_logger.default.ENABLE_ERROR=config.enableError,_logger.default.ENABLE_CALLBACK=config.enableCallback}},{key:"_notifyChange",value:function(){var config,emitter=LoggingControl.emitter;0<emitter.listenerCount("change")&&(config=LoggingControl.getConfig(),emitter.emit("change",config))}},{key:"registerListener",value:function(listener){LoggingControl.emitter.addListener("change",listener)}},{key:"removeListener",value:function(listener){LoggingControl.emitter.removeListener("change",listener)}},{key:"addLogListener",value:function(listener){_logger.default.emitter.addListener("log",listener),0<_logger.default.emitter.listenerCount("log")&&(_logger.default.ENABLE_CALLBACK=!0,LoggingControl._notifyChange())}},{key:"removeLogListener",value:function(listener){_logger.default.emitter.removeListener("log",listener),0===_logger.default.emitter.listenerCount("log")&&(_logger.default.ENABLE_CALLBACK=!1,LoggingControl._notifyChange())}}]),LoggingControl}();LoggingControl.emitter=new _events.default,_exports.default=LoggingControl});