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