import{d as v,g,W as D,e as b,f as r,c as h,i as p,a as k,j as C,o as E,k as c,l as u,c9 as w,c7 as x,P as m,c8 as d,bk as P,Z as V}from"./index-BBlvj0M_.js";import{u as W}from"./usePageTitle-lBdMRcrQ.js";const S=v({__name:"DeploymentEdit",setup(B){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(P.deployment(t.value))}catch(o){const n=V(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 W(_),(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{S as default};
//# sourceMappingURL=DeploymentEdit-Bbc8_nVz.js.map
