(function(){"use strict";u8.Crm.CampaignManagementProcess=function(){};$.extend(u8.Crm.CampaignManagementProcess.prototype,{proceed:function(e){var t=this._getCurrentProcess();if(!t){return}t.set("$process","uid",e.uid);t.proceed()},getSelectedEntityUid:function(){var e=this._getCurrentProcess();if(!e){return null}var t=e.get("uid");return t},setSelectedEntityUid:function(e){var t=this._getCurrentProcess();if(!t){return}var r=e&&u8.isValidRecordUid(e)&&(e.infoAreaId==="CM"||e.infoAreaId==="AK");t.set("$process","selectedEntitySupportsDesigner",r).update("phases");t.set("$process","uid",e)},setProcessToDesignerStage:function(){this._setProcessStage("designer")},setProcessToCalendarStage:function(){this._setProcessStage("calendar")},proceedToNextStep:function(){var e=this._getCurrentProcess();if(!e){return}e.proceed({})},_setProcessStage:function(e){var t=this._getCurrentProcess();if(!t){return}t.set("$process","stage",e).update("all")},_getCurrentProcess:function(){var e=u8.application.getProcessWindow();if(!e){return null}var t=e.page.process;return t}});u8.services.add("campaignManagementProcess",u8.Crm.CampaignManagementProcess)})();