import{b7 as P,r as d,Q as C,cb as D,ca as E,aY as b,aT as m,a$ as c,b9 as w,N as a,bf as n,b_ as u,b0 as o,c as V,bg as H,bh as M,aS as R,bc as g,ba as q,bo as A,aX as F}from"./index-xnhGKCfe.js";import{C as G,R as Q}from"./index-BprM6Ssl.js";import{E as W}from"./index-DxHrjCNU.js";import{c as X,a as Y}from"./main.vue_vue_type_style_index_0_scoped_cf719de6_lang-BLJh8Idj.js";/* empty css              *//* empty css              */import{u as j}from"./index-DsQfWyiL.js";import"./currency-DTUBf2lI.js";import"./dragon-65oA2ftS.js";import"./useWorkerIntervalFn.hook-BuwsgSxq.js";import"./tips-DJIxz9GI.js";import"./trxWingo-CmIrGfKh.js";import"./downIcon-Cn_QdKhc.js";import"./index-D09RZK4J.js";import"./index-BaI210iY.js";const J={class:"trx_r"},K={class:"trx_r-head"},O={class:"trx_r-body"},U={class:"fl"},Z=["onClick"],ee={class:"numberC"},se={key:1,class:"trx_r-body-empty"},ae={key:0,class:"trx_r-foot"},oe={class:"trx_r-foot-page"},te=P({__name:"record",setup(ne){const{gameCode:I,trigger:T}=X(),{historyIssuesTotalPage:h,historyIssues:N}=j(),p=d([]),k=V(()=>(p.value.length?p.value:N.value).map(e=>{if(e.blockId){const s=e.blockId.length,i=e.blockId.substring(s-4,s);e.blockName="**"+i}if(e.issueNumber){const i=e.issueNumber.substring(0,3),v=e.issueNumber.length,t=e.issueNumber.substring(v-4,v);e.issue=i+"**"+t}if(e.blockTimestamp){const s=new Date(e.blockTimestamp);e.time=s.getHours()+":"+s.getMinutes()+":"+s.getSeconds()}return e})||[]),_=d(h.value),$=d(10),l=d(1),y=d(!1),B=()=>{l.value<2||(l.value--,f())},L=()=>{l.value++,!(l.value>_.value)&&f()},f=async()=>{try{y.value=!0;const{result:r,data:e}=await Y({gameCode:I.value,pageNo:l.value,pageSize:$.value});r&&(p.value=e.list,l.value=e.pageNo||1,_.value=e.totalPage||0)}catch{}finally{y.value=!1}},S=r=>{const e=`https://tronscan.org/#/block/${r}`;window.location.href=e},x=d(!1);return C(N,()=>{p.value=[],l.value=1}),C(h,()=>{_.value=h.value}),D(()=>{x.value=!0}),E(()=>{x.value=!1,f()}),T.on(()=>{f()}),(r,e)=>{const s=G,i=Q,v=A;return m(),b("div",J,[c("div",K,[a(i,null,{default:n(()=>[a(s,{span:"5"},{default:n(()=>[u(o(r.$t("common.issueMay")),1)]),_:1}),a(s,{span:"5"},{default:n(()=>[u(o(r.$t("common.trxBlock")),1)]),_:1}),a(s,{span:"5"},{default:n(()=>[u(o(r.$t("common.trxTime")),1)]),_:1}),a(s,{span:"4"},{default:n(()=>[u(o(r.$t("common.trxHash")),1)]),_:1}),a(s,{span:"4"},{default:n(()=>[u(o(r.$t("common.result")),1)]),_:1})]),_:1})]),c("div",O,[k.value.length?(m(!0),b(H,{key:0},M(k.value,(t,z)=>(m(),R(i,{key:z},{default:n(()=>[a(s,{span:"5"},{default:n(()=>[u(o(t.issue),1)]),_:2},1024),a(s,{span:"6"},{default:n(()=>[c("div",U,[u(o(t.blockNumber)+" ",1),t.blockNumber?(m(),b("div",{key:0,class:"Binquire",onClick:re=>S(t.blockNumber)},null,8,Z)):w("",!0)])]),_:2},1024),a(s,{span:"4"},{default:n(()=>[u(o(t.time),1)]),_:2},1024),a(s,{span:"4"},{default:n(()=>[u(o(t.blockName),1)]),_:2},1024),a(s,{span:"4"},{default:n(()=>[c("div",ee,[c("div",{class:g(["number",["num"+t.number]])},o(t.number),3),c("div",{class:g([Number(t.number)>4?"big":"small"])},o(Number(t.number)>4?"B":"S"),3)])]),_:2},1024)]),_:2},1024))),128)):(m(),b("div",se,[a(q(W))]))]),k.value.length?(m(),b("div",ae,[c("div",{class:g(["trx_r-foot-previous",{disabled:l.value<=1}]),onClick:B},[a(v,{name:"arrow-left",class:"trx_r-icon",size:"20"})],2),c("div",oe,o(l.value)+"/"+o(_.value),1),c("div",{class:g(["trx_r-foot-next",{disabled:l.value>=_.value}]),onClick:L},[a(v,{name:"arrow",class:"trx_r-icon",size:"20"})],2)])):w("",!0)])}}}),ye=F(te,[["__scopeId","data-v-0b6b76d4"]]);export{ye as default};
