var Unibase;(function(n){let t;(function(t){let i;(function(i){let r;(function(r){class u extends t.Core.BaseComponent{constructor(){super();this._appGroupManager=i.Managers.AppGroupManager.Instance()}cssFiles(){return[]}jsFiles(){return["platform/appgroups/requests/appgroup.js"]}html(){return`
Edit App Group

You can delete this Group if you do not want this Group to exists for any users across all the portals
`}load(n){var t=this;$("#div_EditAppGroupHeader").removeClass("pa-5");$("#btn_CloseAppGroup").click(function(){t.navigationHelper.closePopUp()});t._appGroupManager.getAppGroup(n).then(function(n){var t=n.result;$("#AppGroupId").val(t.AppGroupId);$("#txt_RenameGroup").val(t.AppGroupName);$("#txt_DisplayIndex").val(t.DisplayIndex)})}deleteGroup(){var t=this,i=Number($("#AppGroupId").val());t._appGroupManager.getAppsByGroup(i).then(function(r){for(var e,f="",u=0;u'+r.result[u].AppTitle+"<\/li>";f!=""&&($("#UlMoveGroup").html(f),$("#GrpItemDiv").removeClass("hidden"));e=$("#UlMoveGroup li").length;e==0&&t._appGroupManager.deleteAppGroup(i).then(function(i){t.navigationHelper.closePopUp();n.Platform.AppGroups.Components.ManageAppGroup.Instance().loadAppGroups();i.errors==null?MessageHelper.Instance().showSuccess("Group Deleted Successfully",""):MessageHelper.Instance().showError(i.errors[0],"Bizgaze_AppGroupErrorMessages")})})}UnGroupAllandDelete(){var t=this,i=$("#AppGroupId").val();t._appGroupManager.deleteAppGroup(i).then(function(i){t.navigationHelper.closePopUp();n.Platform.AppGroups.Components.ManageAppGroup.Instance().loadAppGroups();i.errors==null?MessageHelper.Instance().showSuccess("Group Deleted Successfully",""):MessageHelper.Instance().showError(i.errors[0],"Bizgaze_AppGroupErrorMessages")})}renameGroup(){var i=this,t=new n.Platform.AppGroups.Requests.AppGroup;t.AppGroupId=Number($("#AppGroupId").val());t.DisplayIndex=Number($("#txt_DisplayIndex").val());t.AppGroupName=String($("#txt_RenameGroup").val());i._appGroupManager.saveAppGroup(t).then(function(t){t.errors==null?(MessageHelper.Instance().showSuccess("App Group Saved Successfully",""),i.navigationHelper.closePopUp(),n.Platform.AppGroups.Components.ManageAppGroup.Instance().loadAppGroups()):MessageHelper.Instance().showError(t.errors[0],"Bizgaze_ErrorMessagesEditAppGroup")})}static Instance(){return new u}}r.EditAppGroup=u})(r=i.Components||(i.Components={}))})(i=t.AppGroups||(t.AppGroups={}))})(t=n.Platform||(n.Platform={}))})(Unibase||(Unibase={}));