import{d as v,g as b,f 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,cc as x,ca as E,N as m,cb as d,bo as N,O as V}from"./index-CgvuCQfr.js";import{u as B}from"./usePageTitle-DVT0B9Gy.js";const j=v({__name:"DeploymentEdit",setup(I){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(N.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 B(_),(l,o)=>{const n=C("p-layout-default");return e.value?(w(),g(n,{key:0,class:"deployment-edit"},{header:p(()=>[r(u(x),{deployment:e.value},null,8,["deployment"])]),default:p(()=>[r(u(E),{deployment:e.value,onCancel:f,onSubmit:y},null,8,["deployment"])]),_:1})):k("",!0)}}});export{j as default};
//# sourceMappingURL=DeploymentEdit-CdfySfqt.js.map
