var u=(e,l,a)=>new Promise((c,n)=>{var m=t=>{try{r(a.next(t))}catch(o){n(o)}},i=t=>{try{r(a.throw(t))}catch(o){n(o)}},r=t=>t.done?c(t.value):Promise.resolve(t.value).then(m,i);r((a=a.apply(e,l)).next())});import{B as w,u as C}from"./useTable-CaBV0A9D.js";import{T}from"./index-BPgn07DB.js";import{u as y}from"./index-Bh1SitHa.js";import{O as D,c as k}from"./OauthDrawer-BVwEZpEg.js";import{v,_ as O}from"./entry/index-CP6zkLsN-1726190694502.js";import{g as P,d as S}from"./oauthProvider-B6bCzgQR.js";import{P as B}from"./index-DG9kSxBw.js";import{d as I,a6 as s,_ as b,a7 as _,a8 as p,k as d,G as R,a2 as $,a0 as A}from"./vue-CmlY4eyV.js";import"./useForm-DYTnyn58.js";import"./index-D5QnXKgB.js";import"./antd-Bp5u6ujY.js";import"./tree-Cz4SXb17.js";import"./copyTextToClipboard-o-L2h2rZ.js";import"./index-BAxfTGAN.js";import"./index-caYAhZot.js";import"./index-Ci1vkPDT.js";import"./index-B_Pz7KLI.js";import"./index-5JuY20kX.js";import"./useWindowSizeFn-c2oM7mG1.js";import"./plugin-BdCvh_fX.js";import"./uuid-BUBnBT7J.js";import"./onMountedOrActivated-C4hclMrd.js";import"./sortable.esm-CnNXHMH-.js";import"./useSortable-Dv9W1z21.js";import"./useContentViewHeight-DQ1krU9_.js";const F=I({name:"OauthManagement",components:{BasicTable:w,OauthDrawer:D,TableAction:T,PageWrapper:B},setup(){const{t:e}=v.useI18n(),[l,{openDrawer:a}]=y(),[c,{reload:n}]=C({title:e("sys.oauth.providerList"),api:P,columns:k,useSearchForm:!1,showTableSetting:!0,bordered:!0,showIndexColumn:!1,actionColumn:{width:30,title:e("common.action"),dataIndex:"action",fixed:void 0}});function m(){a(!0,{isUpdate:!1})}function i(o){a(!0,{record:o,isUpdate:!0})}function r(o){return u(this,null,function*(){(yield S({ids:[o.id]})).code===0&&(yield n())})}function t(){return u(this,null,function*(){yield n()})}return{t:e,registerTable:c,registerDrawer:l,handleCreate:m,handleEdit:i,handleDelete:r,handleSuccess:t}}});function N(e,l,a,c,n,m){const i=s("a-button"),r=s("TableAction"),t=s("BasicTable"),o=s("OauthDrawer"),f=s("PageWrapper");return b(),_(f,null,{default:p(()=>[d(t,{onRegister:e.registerTable},{toolbar:p(()=>[d(i,{type:"primary",onClick:e.handleCreate},{default:p(()=>[R($(e.t("sys.oauth.addProvider")),1)]),_:1},8,["onClick"])]),bodyCell:p(({column:g,record:h})=>[g.key==="action"?(b(),_(r,{key:0,actions:[{label:"编辑",onClick:e.handleEdit.bind(null,h)},{label:"删除",color:"error",popConfirm:{title:e.t("common.deleteConfirm"),placement:"left",confirm:e.handleDelete.bind(null,h)}}]},null,8,["actions"])):A("",!0)]),_:1},8,["onRegister"]),d(o,{onRegister:e.registerDrawer,onSuccess:e.handleSuccess},null,8,["onRegister","onSuccess"])]),_:1})}const le=O(F,[["render",N]]);export{le as default};