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