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-CF_FJn6P.js";import"./index-BkgeZpOO.js";import{b as k,c as M}from"./ThirdApp.api-tluixy9O.js";import{u as T,B as _}from"./useForm-8o5KRzWo.js";import{a8 as y,_ as A}from"./index-CYriLmQo.js";import"./BasicModal-BBgVjypv.js";import"./ModalHeader-jGKMr-DQ.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./useTimeout-DC8132dd.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./index-CxQILSKV.js";import"./useWindowSizeFn-BxrEMPtP.js";import"./index-BRTtls-l.js";import"./index-DOuVMe-q.js";import"./index-ByLO0zSl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./componentMap-7D1QIeNI.js";import"./useFormItem-CWa0w7fA.js";import"./download-CkbK5et1.js";import"./base64Conver-24EVOS6V.js";import"./index-QMJkXEyl.js";import"./index-Bb_NRLur.js";import"./useCountdown-C3-PRPLY.js";import"./useFormItemSingle-DM34aWgK.js";import"./JSelectUser-nVFm3ao2.js";import"./props-DoGpHXAD.js";import"./JSelectBiz-BW6f3e--.js";import"./JAddInput-CXT54-j9.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./index-BTSd5ebC.js";import"./index-BTAl55Kt.js";import"./bem-2ra1afoV.js";import"./props-BLY2qIO5.js";import"./useContextMenu-DYyhcDf7.js";import"./depart.api-C9T5xfw6.js";import"./JDictSelectTag-Jqy9TBcS.js";import"./JSelectDept-DorRVguN.js";import"./JPopup-KP1kIsae.js";import"./JEllipsis-287cEHxd.js";import"./JUpload-pyrTRFCz.js";import"./index-Bx9Mnn3N.js";import"./index-B1-pj6uh.js";import"./index-isxCPgHp.js";import"./JAreaLinkage-DFTeDmm8.js";import"./JCodeEditor-_KZ8XnNK.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./EasyCronInput-XK54XB3r.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 Se=A(S,[["render",v]]);export{Se as default};
