"use strict";(self.webpackChunkwebadmin=self.webpackChunkwebadmin||[]).push([["libs_dialogs_change-storage_change-storage_component_ts"],{60018:(R,g,a)=>{a.r(g),a.d(g,{ChangeStorageModalContent:()=>A});var h=a(10467),u=a(82529),p=a(60177),c=a(89417),E=a(49894),P=a(60802),_=a(54843),M=a(19689),y=a(58415),D=a(40221),f=a(48233),t=a(4020),C=a(39060),O=a(64147),b=a(60272);function T(r,l){if(1&r){const e=t.RV6();t.j41(0,"button",12),t.bIt("click",function(){t.eBV(e);const o=t.XpG();return t.Njj(o.dismiss())}),t.nrm(1,"div",13),t.k0s()}}let A=(()=>{let r=class m extends D.f{constructor(e,n,o){super(n),this.system=o,this.LANG=f,this.dismiss=()=>{this.close("cancel")},this.deleteAnalyticsData=e.createProcess(()=>this.deleteAnalyticsDataProcess(),{ignoreError:!0},()=>{this.close("changeOk")},s=>{console.error(s),this.close("error")}),this.keepAnalyticsData=e.createProcess(()=>this.keepAnalyticsDataProcess(),{ignoreError:!0},()=>{this.close("changeOk")},s=>{console.error(s),this.close("error")})}deleteAnalyticsDataProcess(){var e=this;return(0,h.A)(function*(){e.lock();try{const{reply:{settings:{metadataStorageChangePolicy:n}}}=yield(0,_._)(e.system.updateOrGetSystemSettings());return"remove"!==n&&(yield(0,_._)(e.system.updateOrGetSystemSettings({metadataStorageChangePolicy:"remove"}))),Promise.resolve()}catch(n){return Promise.reject(n)}})()}keepAnalyticsDataProcess(){var e=this;return(0,h.A)(function*(){e.lock();try{const{reply:{settings:{metadataStorageChangePolicy:n}}}=yield(0,_._)(e.system.updateOrGetSystemSettings());return"keep"!==n&&(yield(0,_._)(e.system.updateOrGetSystemSettings({metadataStorageChangePolicy:"keep"}))),Promise.resolve()}catch(n){return Promise.reject(n)}})()}static{this.\u0275fac=function(n){return new(n||m)(t.rXU(C.z),t.rXU(u.ce),t.rXU(u.Qs))}}static{this.\u0275cmp=t.VBU({type:m,selectors:[["nx-modal-change-storage"]],features:[t.Vt3],decls:17,vars:17,consts:[["changeStorageForm","ngForm"],["id","changeStorageForm"],[1,"modal-header"],["translate","",1,"modal-title"],["type","button","class","close","data-dismiss","modal","aria-label","Close",3,"click",4,"ngIf"],[1,"modal-body"],["translate","",1,"paragraph"],[1,"paragraph",3,"innerHTML"],[1,"modal-footer","border-top-0"],["actionType","danger",3,"process","form","buttonText"],["actionType","default",3,"process","form","buttonText"],[3,"process","discardFn","cancelFn"],["type","button","data-dismiss","modal","aria-label","Close",1,"close",3,"click"],[1,"close-content"]],template:function(n,o){if(1&n&&(t.j41(0,"form",1,0)(2,"div",2)(3,"h1",3),t.EFF(4," What to do with current analytics data? "),t.k0s(),t.DNE(5,T,2,0,"button",4),t.k0s(),t.j41(6,"div",5)(7,"p",6),t.EFF(8," Current analytics data will not be automatically moved to another location and will become inaccessible. You can keep it and manually move later, or delete permanently. "),t.k0s(),t.nrm(9,"p",7),t.nI1(10,"translate"),t.k0s(),t.j41(11,"div",8),t.nrm(12,"nx-process-button",9),t.nI1(13,"translate"),t.nrm(14,"nx-process-button",10),t.nI1(15,"translate"),t.nrm(16,"nx-cancel-button",11),t.k0s()()),2&n){const s=t.sdS(1);t.R7$(5),t.Y8G("ngIf",o.closable),t.R7$(4),t.Y8G("innerHTML",t.bMT(10,11,o.LANG.dialogs.changeStorage.support),t.npT),t.R7$(3),t.Y8G("process",o.deleteAnalyticsData)("form",s)("buttonText",t.bMT(13,13,"Delete")),t.R7$(2),t.Y8G("process",o.keepAnalyticsData)("form",s)("buttonText",t.bMT(15,15,"Keep")),t.R7$(2),t.Y8G("process",o.deleteAnalyticsData)("discardFn",o.dismiss)("cancelFn",o.unlock)}},dependencies:[p.MD,p.bT,c.YN,c.qT,c.cb,c.cV,P.h,O.M,b.D,M.f,y.N],encapsulation:2})}};return r=function(r,l,e,n){var i,o=arguments.length,s=o<3?l:null===n?n=Object.getOwnPropertyDescriptor(l,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(r,l,e,n);else for(var d=r.length-1;d>=0;d--)(i=r[d])&&(s=(o<3?i(s):o>3?i(l,e,s):i(l,e))||s);return o>3&&s&&Object.defineProperty(l,e,s),s}([(0,E.d)({checkProperties:!0})],r),r})()}}]);