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