import{o as n,g as c,b as o,w as a,u as s,c as f,h as _,F as h,i as p,f as m,a as l,t as d}from"./app-SC54XQDl.js";import{i as k,c as y}from"./app-Ba7ZqSpq.js";import{_ as b}from"./app-DIkpqbGD.js";import{_ as C}from"./app-DZcB_Zcx.js";import{_ as r}from"./app-CWnUJ4gg.js";import{L as g}from"./app-Crd12MWL.js";import{_ as v}from"./app-D9UgVOV0.js";import{_ as x}from"./app-CBN_lwXA.js";import{_ as A}from"./app-BUqHq_rP.js";import"./app-CL60OiIv.js";import"./app-D9TrJBlL.js";import"./app-_Ovp2dOH.js";import"./app-BjSCO7rC.js";import"./app-Dhl-Bw0H.js";import"./app-B2C_dtYI.js";import"./app-COidJXl1.js";import"./app-DHsI_tns.js";import"./app-BZGObKCm.js";import"./app-BPIIxVwk.js";import"./app-PPG0ZS4d.js";import"./app-DgoEZtNT.js";import"./app-Ch8j4za4.js";import"./app-Dw0jKdCD.js";import"./app-DnXuoh8P.js";import"./app-CCkWSX4Q.js";import"./app-C8HFiBxn.js";import"./app-g-bJrEAS.js";import"./app-DZaelcLs.js";import"./app-D_RBJHM6.js";import"./app-CmrRgGIA.js";import"./app-DyP4Nide.js";import"./app-C28obFWS.js";import"./app-CkINxBL9.js";import"./app--Lj8zATS.js";import"./app-C2mBgI5Z.js";import"./app-CNHjdV6U.js";function $(){const{utils:i}=k(this);this.createAccount=function(){i.popup(".createPopup",{callback:function(){i.success("保存成功",function(){i.reload()})}})},this.updateAccount=function(e){i.popup(".updatePopup?accountId="+e,{callback:function(){i.success("保存成功",function(){i.reload()})}})},this.deleteAccount=function(e){i.confirm("确定要删除此账号吗？",function(){this.$post(".delete").params({accountId:e}).refresh()})}}const B={key:1},K=["onClick"],w=l("i",{class:"icon expand small"},null,-1),N={key:0},V={key:0},z={key:1,class:"disabled"},E={key:0},F={key:1,class:"disabled"},I=["onClick"],L=["onClick"],Ct={__name:"index",setup(i){const e=y(new $);return(M,P)=>(n(),c(h,null,[o(b),o(x,null,{default:a(()=>[o(A,{onClick:p(s(e).createAccount,["prevent"]),"action-create":""},{default:a(()=>[m("创建账号")]),_:1},8,["onClick"])]),_:1}),s(e).accounts.length==0?(n(),f(v,{key:0},{default:a(()=>[m("暂时还没有服务商账号。")]),_:1})):_("",!0),s(e).accounts.length>0?(n(),c("div",B,[o(g,{items:s(e).accounts},{default:a(()=>[o(r,{header:"名称",class:"name-column",frozen:""},{body:a(({data:t})=>[l("a",{href:"",onClick:p(u=>s(e).updateAccount(t.id),["prevent"])},[m(d(t.name)+" ",1),w],8,K)]),_:1}),o(r,{header:"服务商",class:"name-column"},{body:a(({data:t})=>[t.provider!=null?(n(),c("span",N,d(t.provider.name),1)):_("",!0)]),_:1}),o(r,{header:"EAB Kid",class:"description-column"},{body:a(({data:t})=>[t.eabKid.length>0?(n(),c("span",V,d(t.eabKid),1)):(n(),c("span",z,"-"))]),_:1}),o(r,{header:"EBA HMAC Key",class:"description-column"},{body:a(({data:t})=>[t.eabKey.length>0?(n(),c("span",E,d(t.eabKey),1)):(n(),c("span",F,"-"))]),_:1}),o(r,{header:"操作",class:"two op",frozen:"","align-frozen":"right"},{body:a(({data:t})=>[l("a",{href:"",onClick:p(u=>s(e).updateAccount(t.id),["prevent"])},"修改",8,I),m("   "),l("a",{href:"",onClick:p(u=>s(e).deleteAccount(t.id),["prevent"])},"删除",8,L)]),_:1})]),_:1},8,["items"])])):_("",!0),o(C,{data:s(e).page},null,8,["data"])],64))}};export{Ct as default};
