import{d as E,m as b,E as k,R as h,c as p,a as C,f as t,w as u,o as n,g as r,aD as g,h as c,aE as w,aF as m,aG as d}from"./index-18beffd6.js";import{u as x}from"./usePageTitle-5c97edcb.js";const S=E({__name:"DeploymentEdit",setup(B){const o=b(),a=k("deploymentId"),i={interval:3e5},y=h(o.deployments.getDeployment,[a.value],i),e=p(()=>y.response);async function f(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 _(){d.back()}const v=p(()=>e.value?`Edit Deployment: ${e.value.name}`:"Edit Deployment");return x(v),(l,s)=>{const D=C("p-layout-default");return n(),t(D,{class:"deployment-edit"},{header:u(()=>[e.value?(n(),t(r(g),{key:0,deployment:e.value},null,8,["deployment"])):c("",!0)]),default:u(()=>[e.value?(n(),t(r(w),{key:0,deployment:e.value,onSubmit:f,onCancel:_},null,8,["deployment"])):c("",!0)]),_:1})}}});export{S as default};
