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-DnroACXc.js";import{i as k,c as y}from"./app-DckefXYL.js";import{_ as b}from"./app-BZtLQ7Ua.js";import{_ as C}from"./app-CjXr3cCY.js";import{_ as r}from"./app-KcnMuQGX.js";import{L as g}from"./app-DM6WPmnv.js";import{_ as v}from"./app-DezwSKU9.js";import{_ as x}from"./app-Z_-2XiXN.js";import{_ as A}from"./app-Dum_NU1V.js";import"./app-C9iVkiu5.js";import"./app-DrIi-dNq.js";import"./app-zueB50zj.js";import"./app-B0NrURRk.js";import"./app-Co2SIBzr.js";import"./app-CUPmXIij.js";import"./app-Cu6FD8m8.js";import"./app-uFawAv7F.js";import"./app-BJhJ7lM8.js";import"./app-Dd07dUxy.js";import"./app-CYYQ_Zep.js";import"./app-Dpl5YSiv.js";import"./app-CF8nmC-F.js";import"./app-NVAx7Sc3.js";import"./app-CF0qXH5Q.js";import"./app-xECxwo4T.js";import"./app-BtWF1kMA.js";import"./app-CGj1gg44.js";import"./app-B4bUdtyo.js";import"./app-BeuOvIof.js";import"./app-DSjO_8RR.js";import"./app-CZGZgDLc.js";import"./app-R-vSvFIF.js";import"./app-HaDoyrq5.js";import"./app-Cmxxk_WX.js";import"./app-B09rlSqG.js";import"./app-LqsmzyUT.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};
