var c=(o,l,t)=>new Promise((d,p)=>{var a=e=>{try{i(t.next(e))}catch(m){p(m)}},n=e=>{try{i(t.throw(e))}catch(m){p(m)}},i=e=>e.done?d(e.value):Promise.resolve(e.value).then(a,n);i((t=t.apply(o,l)).next())});import{d as h,f as g,U as u,a2 as w,ad as I,af as C,k as b}from"./vue-vendor-CxLCUzY4.js";import{B}from"./index-XZKTTfG1.js";import"./index-ByX9XNkE.js";import{b as k,c as M}from"./ThirdApp.api-DFuc5JRk.js";import{u as T,B as _}from"./useForm-Dx3lJ3DG.js";import{a8 as y,_ as A}from"./index-CLZzJyTP.js";import"./BasicModal-B8XmAOm7.js";import"./ModalHeader-DIFQSP_0.js";import"./antd-vue-vendor-CahNzUUa.js";import"./useTimeout-KpZCXEcl.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./index-DvqyyN77.js";import"./useWindowSizeFn-D9PllI8g.js";import"./index-DS3utcig.js";import"./index-BZbg0EjM.js";import"./index-CrdW4fN1.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./componentMap-DpsJvoqz.js";import"./useFormItem-IOFWTdED.js";import"./download-DopMSmFN.js";import"./base64Conver-24EVOS6V.js";import"./index-CDa2_aYE.js";import"./index-D0jTtUNS.js";import"./useCountdown-BpP55PQ2.js";import"./useFormItemSingle-BEyrYQqf.js";import"./JSelectUser-CfAGgHjD.js";import"./props-BtZrRNiI.js";import"./JSelectBiz-CLnJTMe2.js";import"./JAddInput-B36c3B5x.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./index-C7yPiS0L.js";import"./index-44tRnyoF.js";import"./bem-DT3DdmOs.js";import"./props-CG-jAkbI.js";import"./useContextMenu-BGU2vdqV.js";import"./depart.api-DHG2p2Yd.js";import"./JImageUpload-BFwNYdm5.js";import"./JDictSelectTag-CfF54ALX.js";import"./JSelectDept-CaEHrQp6.js";import"./JPopup-BvqhHpPl.js";import"./JEllipsis-C_gT_vEQ.js";import"./JUpload-DgDEmizw.js";import"./index-Bn2zmO2L.js";import"./index-CEznvAVZ.js";import"./index-CfAukas3.js";import"./JAreaLinkage-M9TGy8nY.js";import"./JCodeEditor-CR57XeIe.js";import"./htmlmixed-DoVLO6sG.js";import"./vue-DY75b9GC.js";/* empty css             */import"./EasyCronInput-CWOTSpxK.js";const F=[{label:"id",field:"id",component:"Input",show:!1},{label:"thirdType",field:"thirdType",component:"Input",show:!1},{label:"Agentld",field:"agentId",component:"Input",required:!0},{label:"AppKey",field:"clientId",component:"Input",required:!0},{label:"AppSecret",field:"clientSecret",component:"Input",required:!0},{label:"agentAppSecret",field:"agentAppSecret",component:"Input",ifShow:!1},{label:"启用",field:"status",component:"Switch",componentProps:{checkedChildren:"关闭",checkedValue:1,unCheckedChildren:"开启",unCheckedValue:0},defaultValue:1},{label:"租户id",field:"tenantId",component:"Input",show:!1}],S=h({name:"ThirdAppConfigModal",components:{BasicModal:B,BasicForm:_},setup(o,{emit:l}){const t=g("钉钉配置"),[d,{resetFields:p,setFieldsValue:a,validate:n}]=T({schemas:F,showActionButtonGroup:!1,labelCol:{span:24},wrapperCol:{span:24}}),[i,{setModalProps:e,closeModal:m}]=y(r=>c(this,null,function*(){e({confirmLoading:!0}),r.thirdType=="dingtalk"?t.value="钉钉配置":t.value="企业微信配置",yield p();let s=yield k({tenantId:r.tenantId,thirdType:r.thirdType});e({confirmLoading:!1}),s?yield a(s):yield a(r)}));function f(){return c(this,null,function*(){let r=yield n(),s=!1;r.id&&(s=!0),yield M(r,s),l("success"),m()})}return{title:t,registerForm:d,registerModal:i,handleSubmit:f}}});function v(o,l,t,d,p,a){const n=u("BasicForm"),i=u("BasicModal");return w(),I(i,{onRegister:o.registerModal,width:800,title:o.title,onOk:o.handleSubmit},{default:C(()=>[b(n,{onRegister:o.registerForm},null,8,["onRegister"])]),_:1},8,["onRegister","title","onOk"])}const ve=A(S,[["render",v]]);export{ve as default};
