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