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