import{aY as b,aT as i,a$ as n,b7 as P,r as m,Q as w,cb as H,ca as V,b9 as C,N as s,bf as o,b_ as u,b0 as a,bg as E,bh as M,aS as q,ba as F,bc as k,bo as R,aX as A}from"./index-xnhGKCfe.js";import{_ as G}from"./index.vue_vue_type_style_index_0_lang-9szultRB.js";import{C as Q,R as W}from"./index-BprM6Ssl.js";import{c as X,a as Y}from"./main.vue_vue_type_style_index_0_scoped_cf719de6_lang-BLJh8Idj.js";import{u as j}from"./index-DsQfWyiL.js";import"./currency-DTUBf2lI.js";import"./dragon-65oA2ftS.js";import"./useWorkerIntervalFn.hook-BuwsgSxq.js";/* empty css              *//* empty css              */import"./tips-DJIxz9GI.js";import"./trxWingo-CmIrGfKh.js";import"./downIcon-Cn_QdKhc.js";import"./index-D09RZK4J.js";import"./index-BaI210iY.js";const J={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 28 28"};function K($,g){return i(),b("svg",J,[...g[0]||(g[0]=[n("rect",{width:"28",height:"28",fill:"#FD565C",rx:"14"},null,-1),n("path",{fill:"#fff",d:"M14.327 5.056q2.376 0 3.84 1.344t1.464 3.6q0 2.52-1.56 3.744-1.56 1.2-4.224 1.2l-.072 2.28h-1.896l-.096-3.792h.696q2.376 0 3.72-.72T17.543 10q0-1.44-.864-2.28t-2.328-.84q-1.488 0-2.352.816-.84.792-.84 2.184H9.095q0-1.44.648-2.52a4.37 4.37 0 0 1 1.824-1.704q1.2-.6 2.76-.6m-1.512 17.088q-.624 0-1.056-.432a1.44 1.44 0 0 1-.432-1.056q0-.624.432-1.056t1.056-.432q.6 0 1.008.432.432.432.432 1.056t-.432 1.056a1.33 1.33 0 0 1-1.008.432"},null,-1)])])}const O={render:K},U={class:"trx_r"},Z={class:"trx_r-head"},ee={class:"trx_r-body"},se={class:"fl"},ae={class:"numberC"},te={key:1,class:"trx_r-body-empty"},oe={key:0,class:"trx_r-foot"},ne={class:"trx_r-foot-page"},re=P({__name:"record",setup($){const{gameCode:g,trigger:T}=X(),h=m([]),{historyIssues:B,historyIssuesTotalPage:N}=j(),_=m(N.value),I=m(10),r=m(1),x=m(!1),S=()=>{r.value<2||(r.value--,p())},z=()=>{r.value++,!(r.value>_.value)&&p()},p=async()=>{if(!x.value)try{x.value=!0;const{result:l,data:d}=await Y({gameCode:g.value,pageNo:r.value,pageSize:I.value});l&&(h.value=d.list.map(e=>{if(e.blockId){const c=e.blockId.length,f=e.blockId.substring(c-4,c);e.blockName="**"+f}if(e.issueNumber){const f=e.issueNumber.substring(0,3),v=e.issueNumber.length,t=e.issueNumber.substring(v-4,v);e.issue=f+"**"+t}if(e.blockTimestamp){const c=new Date(e.blockTimestamp);e.time=c.getHours()+":"+c.getMinutes()+":"+c.getSeconds()}return e})||[],r.value=d.pageNo||1,_.value=d.totalPage||0)}catch{}finally{x.value=!1}},D=l=>{const d=`https://tronscan.org/#/block/${l}`;window.location.href=d},y=m(!1);return w(N,()=>{_.value=N.value}),w(B,()=>{r.value=1,p()}),H(()=>{y.value=!0}),V(()=>{y.value=!1,p()}),T.on(()=>{p()}),(l,d)=>{const e=Q,c=W,f=G,v=R;return i(),b("div",U,[n("div",Z,[s(c,null,{default:o(()=>[s(e,{span:"6"},{default:o(()=>[u(a(l.$t("common.issueMay")),1)]),_:1}),s(e,{span:"6"},{default:o(()=>[u(a(l.$t("common.trxBlock")),1)]),_:1}),s(e,{span:"4"},{default:o(()=>[u(a(l.$t("common.trxTime")),1)]),_:1}),s(e,{span:"4"},{default:o(()=>[u(a(l.$t("common.trxHash")),1)]),_:1}),s(e,{span:"4"},{default:o(()=>[u(a(l.$t("common.result")),1)]),_:1})]),_:1})]),n("div",ee,[h.value.length?(i(!0),b(E,{key:0},M(h.value,(t,L)=>(i(),q(c,{key:L},{default:o(()=>[s(e,{span:"6"},{default:o(()=>[u(a(t.issue),1)]),_:2},1024),s(e,{span:"6"},{default:o(()=>[n("div",se,[u(a(t.blockNumber)+" ",1),t.blockNumber?(i(),q(F(O),{key:0,class:"Binquire",onClick:le=>D(t.blockNumber)},null,8,["onClick"])):C("",!0)])]),_:2},1024),s(e,{span:"4"},{default:o(()=>[u(a(t.time),1)]),_:2},1024),s(e,{span:"4"},{default:o(()=>[u(a(t.blockName),1)]),_:2},1024),s(e,{span:"4"},{default:o(()=>[n("div",ae,[n("div",{class:k(["number",["num"+t.number]])},a(t.number),3),n("div",{class:k([Number(t.number)>4?"big":"small"])},a(Number(t.number)>4?"B":"S"),3)])]),_:2},1024)]),_:2},1024))),128)):(i(),b("div",te,[s(f)]))]),h.value.length?(i(),b("div",oe,[n("div",{class:k(["trx_r-foot-previous",{disabled:r.value<=1}]),onClick:S},[s(v,{name:"arrow-left",class:"trx_r-icon",size:"20"})],2),n("div",ne,a(r.value)+"/"+a(_.value),1),n("div",{class:k(["trx_r-foot-next",{disabled:r.value>=_.value}]),onClick:z},[s(v,{name:"arrow",class:"trx_r-icon",size:"20"})],2)])):C("",!0)])}}}),ye=A(re,[["__scopeId","data-v-d7bcef7a"]]);export{ye as default};
