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-BYcXwl4U.js";import{i as k,c as y}from"./app-a6cKceqE.js";import{_ as b}from"./app-BvnL5tNz.js";import{_ as C}from"./app-BsFusN7_.js";import{_ as r}from"./app-BqeukU67.js";import{L as g}from"./app-W_y7sflh.js";import{_ as v}from"./app-uhTxLRnQ.js";import{_ as x}from"./app-B6Y8s8wR.js";import{_ as A}from"./app-DmX24te2.js";import"./app-DCd54JMo.js";import"./app-MrAtUXr3.js";import"./app-BWSI2Z1R.js";import"./app-DPDEogA0.js";import"./app-DxjODhok.js";import"./app-CabATHnR.js";import"./app-BhzV4gWo.js";import"./app-CJCAnMrx.js";import"./app-Cp3gmk2J.js";import"./app--MWyBMkA.js";import"./app-BG60hdvp.js";import"./app-CNARLpXE.js";import"./app-SxAW7vhf.js";import"./app-D5k1HLu9.js";import"./app-ysQ8KbGS.js";import"./app-BDgR0DSb.js";import"./app-Cc2zXvHs.js";import"./app-aSafd0Me.js";import"./app-BHl80pFw.js";import"./app-Btbk6LWy.js";import"./app-CrkKi1Ag.js";import"./app-u5shTDG_.js";import"./app-CO4sV-Ic.js";import"./app-yt37eDzA.js";import"./app-BQ5ggxk2.js";import"./app-D3zbrzdO.js";import"./app-CrjU8lgK.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};
