import{d as f,k as d,c0 as w,r as i,i as k,o as _,c as v,h as g,$ as h}from"./index-BlU6DPnP.js";import{u as y,_ as S}from"./workflow.vue_vue_type_style_index_0_lang-3sh8K__j.js";import{h as $,i as x}from"./workflow-D85MYEv3.js";import"./job-task-list-table.vue_vue_type_script_setup_true_lang-CaM06I1u.js";import"./table-u42G8C7W.js";import"./Grid-Cpsk88_v.js";import"./job-B63-MVN3.js";import"./detail-drawer-C_9uz2U2.js";import"./DescriptionsItem-gspY_Hjg.js";import"./log-drawer-DaQyKcwN.js";import"./CollapseItem-nfFVmwOd.js";import"./dynamic-input.vue_vue_type_script_setup_true_lang-DwXVKZT0.js";import"./DynamicInput-DvfAGTT6.js";import"./code-mirror-1zmFi0Qb.js";import"./cron-input.vue_vue_type_style_index_0_lang-BHP-tMGB.js";import"./notify-BkZnHT3U.js";import"./group-XM1tp95e.js";const H=f({name:"workflow_form_edit",__name:"index",setup(V){const r=y(),p=d(),s=w(),a=i(!1),n=String(p.query.id),e=i({}),m=async()=>{a.value=!0;const{data:t,error:o}=await $(n);o||(e.value=t),a.value=!1};k(()=>{r.clear(),r.setType(0),r.setId(n),m()});const u=async()=>{var o;const{error:t}=await x(e.value);t||((o=window.$message)==null||o.info(h("common.updateSuccess")),s.push({path:"/workflow/task"}))},l=()=>{s.push("/workflow/task")};return(t,o)=>(_(),v(g(S),{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=c=>e.value=c),spinning:a.value,onSave:u,onCancel:l},null,8,["modelValue","spinning"]))}});export{H as default};
