import{c as R,la as $}from"./chunk-QO5S5KE6.js";import{$c as I,bd as j,sc as b}from"./chunk-HLN442RE.js";import{G as l,N as h,Na as s,Ra as S,Ta as a,Tc as D,V as v,Wa as x,X as C,Yc as c,cb as g,d as f,da as r,ha as M,ja as n,oc as y}from"./chunk-J6V2RHPS.js";import"./chunk-CLKATWRW.js";import{a as m,b as u}from"./chunk-Y6TIJFHU.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};
