text: // Copyright (c) 2009-2017 SAP SE, All Rights Reserved
  sap.ui.define(["sap/ui/core/service/ServiceFactoryRegistry","sap/ui/core/service/ServiceFactory","sap/ui/core/service/Service","sap/ui/base/EventProvider"],function(S,a,b,E){"use strict";var O={statusChanged:"statusChanged",serviceStateChanged:"serviceStateChanged"};var U=b.extend("sap.ushell.ui5service.UserStatus",{init:function(){U.prototype.isEnabled=false;S.register("sap.ushell.ui5service.UserStatus",new a(U));this.oEventProvider=new E();U.prototype.AvailableStatus={AVAILABLE:"AVAILABLE",AWAY:"AWAY",BUSY:"BUSY",APPEAR_OFFLINE:"APPEAR_OFFLINE"};},exit:function(){this.oEventProvider.destroy();}});U.prototype.setEnabled=function(e){this.oEventProvider.fireEvent(O.serviceStateChanged,{data:e});U.prototype.isEnabled=e;return;};U.prototype.setStatus=function(n){if(!U.prototype.isEnabled){throw new Error("Unable to change status because the UserStatus service is disabled.");}if(!U.prototype.AvailableStatus[n]&&n!==null){throw new Error("Enter a valid status.");}this.oEventProvider.fireEvent(O.statusChanged,{data:n});};U.prototype.attachStatusChanged=function(f){this.oEventProvider.attachEvent(O.statusChanged,f);};U.prototype.detachStatusChanged=function(f){this.oEventProvider.detachEvent(O.statusChanged,f);};return U;});
  