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