var y=(c,r,s)=>new Promise((m,l)=>{var d=e=>{try{u(s.next(e))}catch(t){l(t)}},p=e=>{try{u(s.throw(e))}catch(t){l(t)}},u=e=>e.done?m(e.value):Promise.resolve(e.value).then(d,p);u((s=s.apply(c,r)).next())});import{_ as x}from"./write.vue_vue_type_script_setup_true_lang-CRidS1g4.js";import{_ as R}from"./ContentDetailWrap.vue_vue_type_script_setup_true_lang-BT6PDDaO.js";import{c as k}from"./index-OziN21LA.js";import{l as C,aB as b,aI as D,r as _,ai as $,m as J,M as K,O as f,U as v,S as w,u as i}from"./vue-chunks-l-AyUCfi.js";import{v as N,w as T,x as h}from"./index-Cl3s0rC0.js";import{u as I}from"./useEventBus-yN5ROQx3.js";import"./useForm-DFfbRY9m.js";import"./element-plus-C2aeItNs.js";import"./wang-editor-D6T5hJzu.js";import"./tsxHelper-BLTo71S4.js";import"./useValidator-dY8qp_qX.js";import"./message.vue_vue_type_script_setup_true_lang-C0R52Rsd.js";import"./material.vue_vue_type_script_setup_true_lang-yKaOPhwY.js";import"./Dialog.vue_vue_type_style_index_0_lang-DTUY8bxL.js";import"./check.vue_vue_type_script_setup_true_lang-Dmnb7eMH.js";import"./useCrudSchemas-BcUSI-wT.js";import"./tree-Dgaev6Pi.js";import"./index-BQ7fd9kg.js";const Z=C({__name:"operate",props:{type:{type:String,default:"add"},id:{type:Number,default:0}},setup(c){const r=c,{emit:s}=I(),{push:m,go:l}=b();D();const{t:d}=k(),p=_(null);y(this,null,function*(){if(r.type=="add")return;const a=yield N(r.id);a&&(p.value=a)});const e=_(),t=_(!1),g=()=>y(this,null,function*(){const a=i(e),o=yield a==null?void 0:a.submit();if(o){t.value=!0;let n=null;r.type=="edit"?n=yield T(o).catch(()=>{}).finally(()=>{t.value=!1}):n=yield h(o).catch(()=>{}).finally(()=>{t.value=!1}),n&&(s("getList",r.type),m("/group/index"))}});return(a,o)=>{const n=$("BaseButton");return J(),K(i(R),{message:`当好友发送指定入群关键词时，会自动邀请其进入指定群，并触发自动欢迎词
`,title:i(d)("exampleDemo.edit"),onBack:o[1]||(o[1]=B=>i(m)("/group/index"))},{header:f(()=>[v(n,{onClick:o[0]||(o[0]=B=>i(l)(-1))},{default:f(()=>[w(" 返回 ")]),_:1}),v(n,{type:"primary",loading:t.value,onClick:g},{default:f(()=>[w(" 保存 ")]),_:1},8,["loading"])]),default:f(()=>[v(x,{ref_key:"writeRef",ref:e,"current-row":p.value},null,8,["current-row"])]),_:1},8,["title"])}}});export{Z as default};
