import{B as y}from"./BasicForm-dL_oCSPM.js";import{u as B}from"./useForm-CKmgcynv.js";import{_ as R}from"./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";import"./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";import{u as b}from"./useModal-CO65vga3.js";import{s as x}from"./schemas-CbDhWCxw.js";import{d as M,u as C,aw as F,c as N,o as S,l as t,w as T,i as V,j as O,ac as A}from"./index-9PRMimni.js";const D={class:"mt-6"},$=M({__name:"CreateDialog",props:{title:{type:String,default:"添加预约"},width:{type:Number,default:450},permissionList:{type:Array}},emits:["change","register"],setup(L,{expose:i,emit:n}){const r=n,m=C(),[u,{submit:c,getFieldsValue:l,setFieldsValue:f,resetFields:p}]=B({gridProps:{cols:1},layout:"horizontal",submitButtonText:"保存",showActionButtonGroup:!1,schemas:x}),[g,{openModal:o,closeModal:a,setSubLoading:d}]=b({title:"新增预约",subBtuText:"提交",width:600});function _(e){if(e){e.makeDate=118313526e4,e.makeTime=118313326e4,e.type=1,e.mobile=18888888888,e.source="朋友介绍",w(e);return}o()}async function h(){if(!await c())return;const s=l();m.success("提交成功："+JSON.stringify(s)),console.log("表单返回值：",s),r("change"),a()}function k(){p()}function w(e){o(),A(()=>{f(e)})}return F(()=>{}),i({showModal:_,closeModal:a,setSubLoading:d}),(e,s)=>(S(),N(t(R),{onRegister:t(g),ref:"modalRef",onOnOk:h},{default:T(()=>[V("div",D,[O(t(y),{onRegister:t(u),onReset:k},null,8,["onRegister"])])]),_:1},8,["onRegister"]))}});export{$ as _};
