import{d as E,v as b,E as k,R as C,c as p,a as g,e as t,w as r,o as n,g as u,aD as h,i as c,aE as w,aF as m,aG as d}from"./index-a91efef8.js";import{u as x}from"./usePageTitle-6b86fe3b.js";const S=E({__name:"DeploymentEdit",setup(B){const o=b(),a=k("deploymentId"),i={interval:3e5},y=C(o.deployments.getDeployment,[a.value],i),e=p(()=>y.response);async function _(l){try{await o.deployments.updateDeployment(a.value,l),m("Deployment updated","success"),d.back()}catch(s){m("Error updating deployment","error"),console.warn(s)}}function f(){d.back()}const v=p(()=>e.value?`Edit Deployment: ${e.value.name}`:"Edit Deployment");return x(v),(l,s)=>{const D=g("p-layout-default");return n(),t(D,{class:"deployment-edit"},{header:r(()=>[e.value?(n(),t(u(h),{key:0,deployment:e.value},null,8,["deployment"])):c("",!0)]),default:r(()=>[e.value?(n(),t(u(w),{key:0,deployment:e.value,onSubmit:_,onCancel:f},null,8,["deployment"])):c("",!0)]),_:1})}}});export{S as default};
