import{d as v,_ as b,W as D,b as g,e as r,c as h,f as c,a as k,g as C,o as E,j as p,k as u,cd as w,cb as x,P as m,cc as d,bo as P,Y as V}from"./index-BrFqolpA.js";import{u as j}from"./usePageTitle-CsnULHHx.js";const S=v({__name:"DeploymentEdit",setup(B){const a=b(),t=D("deploymentId"),i={interval:3e5},s=g(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(P.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 j(f),(l,o)=>{const n=C("p-layout-default");return e.value?(E(),h(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{S as default};
//# sourceMappingURL=DeploymentEdit-Dpiwo1MR.js.map
