import{d as e,r as a,k as r,n as t,q as n,s,o as u,l,e as o,t as i,u as d,J as p,a as f,w as m,F as b,b as c,c as v,m as k}from"./vendor.4de80491.js";import{g}from"./index.48228361.js";const w={key:0},y=c("br",null,null,-1),T=["innerHTML"],U=["href"],_={key:1},h=e({props:{uid:{type:Number,required:!0}},setup(e){const h=e;let L=a(""),C=a(0),M=a([]);function H(e){var a=new Date(1e3*e),r=a.getFullYear(),t=a.getMonth()+1,n=a.getDate(),s=a.getHours(),u=a.getMinutes();return r+"-"+j(t)+"-"+j(n)+" "+j(s)+":"+j(u)}function j(e){return e<10?"0"+e:String(e)}return r((()=>{t((()=>{C.value=0,async function(e){let a=await g(),r=[];M.value=[];for(const t in a)a[t].Uid!=String(e)&&0!=e||(L.value=a[t].Username,C.value+=a[t].Count,r.push(a[t]));document.title=0==e?"绿宝石列表":`${L.value} 的绿宝石使用列表`;r.sort(((e,a)=>a.Time-e.Time));for(const t of r){let e=t;""==e.Link&&"mcbbsAd"==e.Type?e.v="none（宣传栏）":e.v="link",e.time=H(e.Time),M.value.push(e)}}(h.uid)}))})),(a,r)=>{const t=n,g=s;return u(),l(b,null,[0!=e.uid?(u(),l("p",w,[o(i(d(L))+"("+i(e.uid)+") ",1),y,o(" 总数： "+i(d(C)),1)])):p("",!0),f(g,{data:d(M)},{default:m((()=>[0==e.uid?(u(),v(t,{key:0,prop:"Uid",label:"uid"},{default:m((({row:e})=>[f(d(k),{to:"/user/"+e.Uid},{default:m((()=>[o(i(e.Uid),1)])),_:2},1032,["to"])])),_:1})):p("",!0),0==e.uid?(u(),v(t,{key:1,prop:"Username",label:"用户名"})):p("",!0),f(t,{prop:"Count",label:"绿宝石数",sortable:""}),f(t,{prop:"time",label:"时间",sortable:""}),f(t,{prop:"Cause",label:"原因"},{default:m((({row:e})=>[c("span",{innerHTML:e.Cause},null,8,T)])),_:1}),f(t,{label:"链接"},{default:m((e=>[e.row.Link?(u(),l("a",{key:0,href:e.row.Link,target:"_blank",referrerpolicy:"no-referrer"},i(e.row.v),9,U)):(u(),l("span",_,i(e.row.v),1))])),_:1})])),_:1},8,["data"])],64)}}});export{h as default};
