import{c as R,va as $}from"./chunk-T3QOFN7N.js";import{_f as I,ag as j,rf as b}from"./chunk-UJH7VVYJ.js";import{G as l,N as h,Oa as s,Sa as S,Ua as a,V as v,Vc as D,X as C,Xa as x,_c as c,d as f,da as r,db as g,ha as M,ja as n,pc as y}from"./chunk-AERFJGGZ.js";import"./chunk-KG2AOBAM.js";import{a as m,b as u}from"./chunk-4KQZYG2V.js";function J(e,t){if(e&1&&x(0,"app-html-editor",1),e&2){let d=g();a("dataSource",d.dataSource)("editable",d.editable)}}var w=(()=>{let t=class{constructor(o,i,p){this.contextService=o,this.activatedRoute=i,this.userService=p,this.appContext={},this.componentDestroyed$=new f}ngOnInit(){this.activatedRoute.params.pipe(v(o=>this.setContext(o)),l(()=>this.userService.isDatabaseAdmin(this.appContext).pipe(h())),C(this.componentDestroyed$)).subscribe(o=>{this.editable=o,this.dataSource={getHtmlFilePath:`/api/Start/${this.appContext.server}/${this.appContext.cluster}`,postHtmlFilePath:`/api/Start/${this.appContext.server}/${this.appContext.cluster}`}})}setContext(o){return this.appContext=u(m({},o),{clusterMode:b.Start}),this.contextService.setContext(this.appContext)}ngOnDestroy(){this.componentDestroyed$.next(!0),this.componentDestroyed$.complete()}},e=t;return(()=>{t.\u0275fac=function(i){return new(i||t)(s(j),s(D),s(I))}})(),(()=>{t.\u0275cmp=M({type:t,selectors:[["app-cluster-start"]],decls:1,vars:1,consts:[[3,"dataSource","editable",4,"ngIf"],[3,"dataSource","editable"]],template:function(i,p){i&1&&S(0,J,1,2,"app-html-editor",0),i&2&&a("ngIf",p.dataSource)},dependencies:[y,R]})})(),e})();var H=[{path:"",component:w},{path:"**",redirectTo:"",pathMatch:"full"}],F=(()=>{let t=class{},e=t;return(()=>{t.\u0275fac=function(i){return new(i||t)}})(),(()=>{t.\u0275mod=n({type:t})})(),(()=>{t.\u0275inj=r({imports:[c.forChild(H),c]})})(),e})();var tt=(()=>{let t=class{},e=t;return(()=>{t.\u0275fac=function(i){return new(i||t)}})(),(()=>{t.\u0275mod=n({type:t})})(),(()=>{t.\u0275inj=r({imports:[F,$]})})(),e})();export{tt as StartModule};
