import{d as v,g,W as D,e as b,i as r,c as h,j as p,a as k,k as C,o as E,l as c,m as u,c9 as w,c7 as x,P as m,c8 as d,bk as B,L as P}from"./index-Cq5Q7kWk.js";import{u as V}from"./usePageTitle-NgGMZFeo.js";const W=v({__name:"DeploymentEdit",setup(I){const a=g(),t=D("deploymentId"),i={interval:3e5},s=b(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(B.deployment(t.value))}catch(o){const n=P(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 V(_),(l,o)=>{const n=C("p-layout-default");return e.value?(E(),h(n,{key:0,class:"deployment-edit"},{header:p(()=>[c(u(w),{deployment:e.value},null,8,["deployment"])]),default:p(()=>[c(u(x),{deployment:e.value,onCancel:f,onSubmit:y},null,8,["deployment"])]),_:1})):k("",!0)}}});export{W as default};
//# sourceMappingURL=DeploymentEdit-BW7cDiW4.js.map
