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-zKZnG1QC.js";import"./index-BN26Feep.js";import{b as k,c as M}from"./ThirdApp.api-CkkgAhKS.js";import{u as T,B as _}from"./useForm-DfoT2G6J.js";import{a8 as y,_ as A}from"./index-Cy4uayzW.js";import"./BasicModal-sKcs_9Ir.js";import"./ModalHeader-ByCVDoqO.js";import"./antd-vue-vendor-CahNzUUa.js";import"./useTimeout-gJpgadD6.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./index-Bdn0r8CG.js";import"./useWindowSizeFn-DDyhhqyw.js";import"./index-CYoRlduV.js";import"./index-DYB8Ashr.js";import"./index-CrdW4fN1.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./componentMap-0iK4HQBq.js";import"./useFormItem-IOFWTdED.js";import"./download-Bn4f3tzD.js";import"./base64Conver-24EVOS6V.js";import"./index-D6H6KsT6.js";import"./index-CLxBW_h0.js";import"./useCountdown-2P9HvnfJ.js";import"./useFormItemSingle-BEyrYQqf.js";import"./JSelectUser-B98pRPrS.js";import"./props-CtlWAg-s.js";import"./JSelectBiz-vYDBA0SK.js";import"./JAddInput-DP4caUmw.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./index-tDBMxW9-.js";import"./index-CNQBnF3P.js";import"./bem-IZKqD41e.js";import"./props-CG-jAkbI.js";import"./useContextMenu-Q6J5bB_u.js";import"./depart.api-B8q8MC-j.js";import"./JImageUpload-C5OCTlCG.js";import"./JDictSelectTag-CalJXNVe.js";import"./JSelectDept-D-TUaHvK.js";import"./JPopup-CVHkQZFq.js";import"./JEllipsis-TuDc52fh.js";import"./JUpload-DSWoDwh2.js";import"./index-B4vNk56t.js";import"./index-Dc7Jr5-j.js";import"./index-Dm1rPBfc.js";import"./JAreaLinkage-CTMEfTuh.js";import"./JCodeEditor-U9QIstNN.js";import"./htmlmixed-DoVLO6sG.js";import"./vue-DY75b9GC.js";/* empty css             */import"./EasyCronInput-CZdChTcP.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};
