import{d as b,b as v,W as h,t as D,e as p,c as g,g as r,a as C,h as k,o as w,n as u,j as c,b3 as E,b4 as x,b5 as m,b6 as d,ae as V,b7 as B}from"./index-CPxpbp4R.js";import{u as I}from"./usePageTitle-CcH2lmI6.js";const W=b({__name:"DeploymentEdit",setup(N){const a=v(),t=h("deploymentId"),i={interval:3e5},s=D(a.deployments.getDeployment,[t.value],i),e=p(()=>s.response);async function y(l){try{await a.deployments.updateDeploymentV2(t.value,l),m("Deployment updated","success"),s.refresh(),d.push(V.deployment(t.value))}catch(o){const n=B(o,"Error updating deployment");m(n,"error"),console.warn(o)}}function f(){d.back()}const _=p(()=>e.value?`Edit Deployment: ${e.value.name}`:"Edit Deployment");return I(_),(l,o)=>{const n=k("p-layout-default");return e.value?(w(),g(n,{key:0,class:"deployment-edit"},{header:r(()=>[u(c(E),{deployment:e.value},null,8,["deployment"])]),default:r(()=>[u(c(x),{deployment:e.value,onCancel:f,onSubmit:y},null,8,["deployment"])]),_:1})):C("",!0)}}});export{W as default};
//# sourceMappingURL=DeploymentEdit-DoNlJ4Qh.js.map
