import{d as v,al as b,W as h,t as C,b as p,c as D,e as r,a as g,f as k,o as E,g as u,h as c,bL as w,bM as x,_ as m,bN as d,aX as N,C as V}from"./index-BjFilUfY.js";import{u as B}from"./usePageTitle-J4-vayug.js";const L=v({__name:"DeploymentEdit",setup(I){const a=b(),t=h("deploymentId"),i={interval:3e5},s=C(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(N.deployment(t.value))}catch(o){const n=V(o,"Error updating deployment");m(n,"error"),console.warn(o)}}function _(){d.back()}const f=p(()=>e.value?`Edit Deployment: ${e.value.name}`:"Edit Deployment");return B(f),(l,o)=>{const n=k("p-layout-default");return e.value?(E(),D(n,{key:0,class:"deployment-edit"},{header:r(()=>[u(c(w),{deployment:e.value},null,8,["deployment"])]),default:r(()=>[u(c(x),{deployment:e.value,onCancel:_,onSubmit:y},null,8,["deployment"])]),_:1})):g("",!0)}}});export{L as default};
//# sourceMappingURL=DeploymentEdit-C-SJl2U_.js.map
