import{d as v,ao as D,j as l,c as o,w as m,r as h,o as n,u as t,b4 as C,m as c,b5 as w}from"./index-4d9fe32c-718dc5d9.js";import{L as u}from"./prefect-design-a921a7c6.js";import{u as E,c as g}from"./vue-compositions-55710141.js";import{u as x}from"./usePageTitle-e8e2e29d.js";import{r as d}from"./index-558d177a.js";import"./routes-1bd54f1a.js";import"./meta-26546594.js";const P=v({__name:"DeploymentEdit",setup(S){const a=D(),r=E("deploymentId"),i={interval:3e5},y=g(a.deployments.getDeployment,[r.value],i),e=l(()=>y.response);async function f(s){try{await a.deployments.updateDeployment(r.value,s),u("Deployment updated","success"),d.back()}catch(p){u("Error updating deployment","error"),console.warn(p)}}function _(){d.back()}const b=l(()=>e.value?`Edit Deployment: ${e.value.name}`:"Edit Deployment");return x(b),(s,p)=>{const k=h("p-layout-default");return n(),o(k,{class:"deployment-edit"},{header:m(()=>[t(e)?(n(),o(t(C),{key:0,deployment:t(e)},null,8,["deployment"])):c("",!0)]),default:m(()=>[t(e)?(n(),o(t(w),{key:0,deployment:t(e),onSubmit:f,onCancel:_},null,8,["deployment"])):c("",!0)]),_:1})}}});export{P as default};
