"use strict";(self.webpackChunkwebadmin=self.webpackChunkwebadmin||[]).push([["libs_dialogs_change-storage_change-storage_component_ts"],{60018:(R,g,n)=>{n.r(g),n.d(g,{ChangeStorageModalContent:()=>A});var u=n(10467),h=n(82529),p=n(60177),l=n(89417),E=n(49894),P=n(60802),_=n(54843),f=n(19689),M=n(58415),y=n(40221),D=n(48233),t=n(4020),C=n(39060),O=n(64147),b=n(60272);function T(r,c){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 y.f{constructor(e,a,o){super(a),this.system=o,this.LANG=D,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,u.A)(function*(){e.lock();try{const{reply:{settings:{metadataStorageChangePolicy:a}}}=yield(0,_._)(e.system.updateOrGetSystemSettings());return"remove"!==a&&(yield(0,_._)(e.system.updateOrGetSystemSettings({metadataStorageChangePolicy:"remove"}))),Promise.resolve()}catch(a){return Promise.reject(a)}})()}keepAnalyticsDataProcess(){var e=this;return(0,u.A)(function*(){e.lock();try{const{reply:{settings:{metadataStorageChangePolicy:a}}}=yield(0,_._)(e.system.updateOrGetSystemSettings());return"keep"!==a&&(yield(0,_._)(e.system.updateOrGetSystemSettings({metadataStorageChangePolicy:"keep"}))),Promise.resolve()}catch(a){return Promise.reject(a)}})()}static{this.\u0275fac=function(a){return new(a||m)(t.rXU(C.z),t.rXU(h.ce),t.rXU(h.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(a,o){if(1&a&&(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&a){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,l.YN,l.qT,l.cb,l.cV,P.h,O.M,b.D,f.f,M.N],encapsulation:2})}};return r=function(r,c,e,a){var i,o=arguments.length,s=o<3?c:null===a?a=Object.getOwnPropertyDescriptor(c,e):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(r,c,e,a);else for(var d=r.length-1;d>=0;d--)(i=r[d])&&(s=(o<3?i(s):o>3?i(c,e,s):i(c,e))||s);return o>3&&s&&Object.defineProperty(c,e,s),s}([(0,E.d)({checkProperties:!0})],r),r})()}}]);