import{d as v,h as b,W as h,t as D,j as c,c as g,k as p,a as k,l as C,o as w,m as r,n as u,cd as E,cb as x,M as m,cc as d,bo as B,Y as V}from"./index-CKtbewUP.js";import{u as I}from"./usePageTitle-BJBko9bD.js";const W=v({__name:"DeploymentEdit",setup(N){const a=b(),t=h("deploymentId"),i={interval:3e5},s=D(a.deployments.getDeployment,[t.value],i),e=c(()=>s.response);async function y(l){try{await a.deployments.updateDeploymentV2(t.value,l),m("Deployment updated","success"),s.refresh(),d.push(B.deployment(t.value))}catch(o){const n=V(o,"Error updating deployment");m(n,"error"),console.warn(o)}}function f(){d.back()}const _=c(()=>e.value?`Edit Deployment: ${e.value.name}`:"Edit Deployment");return I(_),(l,o)=>{const n=C("p-layout-default");return e.value?(w(),g(n,{key:0,class:"deployment-edit"},{header:p(()=>[r(u(E),{deployment:e.value},null,8,["deployment"])]),default:p(()=>[r(u(x),{deployment:e.value,onCancel:f,onSubmit:y},null,8,["deployment"])]),_:1})):k("",!0)}}});export{W as default};
//# sourceMappingURL=DeploymentEdit-DvXpmJUZ.js.map
