var m=(n,l,t)=>new Promise((c,r)=>{var p=e=>{try{a(t.next(e))}catch(s){r(s)}},i=e=>{try{a(t.throw(e))}catch(s){r(s)}},a=e=>e.done?c(e.value):Promise.resolve(e.value).then(p,i);a((t=t.apply(n,l)).next())});import{u as h,F as v}from"./useForm-kq1sxERw.js";import"./useValidator-BN3tPovt.js";import{l as w,r as P,Z as _,w as g,m as x,M as R,u as d}from"./vue-chunks-DyZSmvoe.js";const E=w({__name:"Write",props:{currentRow:{type:Object,default:()=>null}},setup(n,{expose:l}){const t=n,c=P([{field:"topic",label:"群名",component:"Input",colProps:{span:24},componentProps:{disabled:!0}},{field:"type",label:"消息类型",component:"RadioGroup",value:1,colProps:{span:24},componentProps:{disabled:!0,options:[{label:"文字",value:1},{label:"文件",value:2},{label:"h5链接",value:4},{label:"小程序",value:5}]}},{field:"content",label:"内容",colProps:{span:24},component:"Input",componentProps:{type:"textarea",rows:"3"}},{field:"weixin",componentProps:{hidden:!0}}]),r=_({}),{formRegister:p,formMethods:i}=h(),{setValues:a,getFormData:e,getElFormExpose:s,setSchema:y}=i,f=()=>m(this,null,function*(){const o=yield s();if(yield o==null?void 0:o.validate().catch(u=>{}))return yield e()});return g(()=>t.currentRow,o=>{o&&a(o)},{deep:!0,immediate:!0}),l({submit:f}),(o,b)=>(x(),R(d(v),{rules:r,"auto-set-placeholder":!1,onRegister:d(p),schema:c.value},null,8,["rules","onRegister","schema"]))}});export{E as _};
