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-D2AmS0aU.js";import"./index-ARbUvvsq.js";import{b as k,c as M}from"./ThirdApp.api-DPH6Rmmi.js";import{u as T,B as _}from"./useForm-CcjrODHR.js";import{a8 as y,_ as A}from"./index-B_2CoVdl.js";import"./BasicModal-D3g2CFhF.js";import"./ModalHeader-C-C0dUi_.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./useTimeout-CB9F1PLu.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./index-DAURrYyA.js";import"./useWindowSizeFn-C3WExEpc.js";import"./index-Dz2zbQB_.js";import"./index-exs4VcBw.js";import"./index-ByLO0zSl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./componentMap-CzCGDP7x.js";import"./useFormItem-CWa0w7fA.js";import"./download-2tYEzlDW.js";import"./base64Conver-24EVOS6V.js";import"./index-Cgt544dC.js";import"./index-BZ9ST2iq.js";import"./useCountdown-ImUE7YaG.js";import"./useFormItemSingle-DM34aWgK.js";import"./JSelectUser-BQIJUcBR.js";import"./props-BCVPj-bG.js";import"./JSelectBiz-CJyWq5s2.js";import"./JAddInput-YFlAniYT.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./index-CkL00Q0a.js";import"./index-BKs2x_To.js";import"./bem-C6eT35UB.js";import"./props-BLY2qIO5.js";import"./useContextMenu-CSt5a1-F.js";import"./depart.api-0qTriT9h.js";import"./JDictSelectTag-CxpDdimB.js";import"./JSelectDept-wKz_Qtmc.js";import"./JPopup-BJBYqoWe.js";import"./JEllipsis-Cn7GCKHR.js";import"./JUpload-DzM-D4DX.js";import"./index-khU3p_On.js";import"./index-DPEnuI0R.js";import"./index-Cnb8BkwG.js";import"./JAreaLinkage-CSgDAlrn.js";import"./JCodeEditor-esTLnfS3.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./EasyCronInput-DclSHT47.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};
