var u=(t,l,o)=>new Promise((c,r)=>{var i=a=>{try{s(o.next(a))}catch(e){r(e)}},n=a=>{try{s(o.throw(a))}catch(e){r(e)}},s=a=>a.done?c(a.value):Promise.resolve(a.value).then(i,n);s((o=o.apply(t,l)).next())});import{B as h}from"./BasicForm.948b0243.js";import{B as b,a as B}from"./index.4b403226.js";import{aH as _,r as f,a as M,aJ as d,o as g,aK as C,p as F,i as P,j as v,b6 as E,eS as k,eT as S,x as w}from"./index.bde7963b.js";import"./index.0103b3aa.js";import"./index.3289c967.js";import"./_baseIteratee.34b68bfe.js";import"./index.9b1e5ec7.js";import"./index.dcd3d2b7.js";import"./index.18602d99.js";import"./index.bfd670f8.js";import"./index.13318916.js";import"./index.ce7c5e55.js";import"./index.b75cc0a1.js";import"./uniqBy.3333e3da.js";import"./download.dc299cb5.js";import"./useWindowSizeFn.ada338ad.js";const m=f(null),y=M({components:{BasicForm:h,BasicModal:b},emits:["reload","register"],setup(t,{emit:l}){const o=f(""),c=[{field:"name",component:"Input",label:"\u540D\u5B57",colProps:{span:24},required:!0},{field:"pid",component:"ApiTreeSelect",label:"\u4E0A\u7EA7\u83DC\u5355",componentProps:{api:k,resultField:"list"},colProps:{span:24}},{field:"icon",component:"IconPicker",label:"\u56FE\u6807",colProps:{span:24}},{field:"overwrite",component:"Checkbox",label:"\u5F3A\u5236\u8986\u76D6",colProps:{span:24}}],[r,{closeModal:i}]=B(e=>u(this,null,function*(){var p;o.value=e.table,(p=m.value)==null||p.appendSchemaByField({field:"table",component:"Input",label:"",colProps:{span:0},componentProps:{hidden:!0},defaultValue:o},"")})),{createMessage:n}=w(),{success:s}=n;return{formElRef:m,handleSubmit:()=>u(this,null,function*(){try{const e=m.value;if(!e)return;const p=yield e.validate();yield S(p),i(),s("\u64CD\u4F5C\u6210\u529F"),l("reload")}catch(e){console.log(e)}}),schemas:c,register:r}}}),A={class:"mt-3"};function D(t,l,o,c,r,i){const n=d("BasicForm"),s=d("BasicModal");return g(),C(s,E(t.$attrs,{destroyOnClose:"",onRegister:t.register,title:"\u4E00\u952E\u751F\u6210\u83DC\u5355",onOk:t.handleSubmit}),{default:F(()=>[P("div",A,[v(n,{schemas:t.schemas,ref:"formElRef",labelWidth:75,showActionButtonGroup:!1},null,8,["schemas"])])]),_:1},16,["onRegister","onOk"])}var Q=_(y,[["render",D]]);export{Q as default};
