import{d as f,k as d,c0 as w,r as n,i as k,o as _,c as v,h as g,$ as y}from"./index-BlU6DPnP.js";import{u as S,_ as h}from"./workflow.vue_vue_type_style_index_0_lang-3sh8K__j.js";import{h as $,e 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 G=f({name:"workflow_form_copy",__name:"index",setup(W){const a=S(),i=d(),s=w(),r=n(!1),m=String(i.query.id),e=n({workflowName:`Workflow ${new Date().getTime()}`,workflowStatus:1,blockStrategy:1,description:void 0,executorTimeout:60}),l=async()=>{r.value=!0;const{data:t,error:o}=await $(m);o||(e.value=t),r.value=!1};k(()=>{a.clear(),a.setType(0),l()});const c=async()=>{var o;const{error:t}=await x(e.value);t||((o=window.$message)==null||o.info(y("common.addSuccess")),s.push("/workflow/task"))},u=()=>{s.push("/workflow/task")};return(t,o)=>(_(),v(g(h),{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=p=>e.value=p),spinning:r.value,onSave:c,onCancel:u},null,8,["modelValue","spinning"]))}});export{G as default};
