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