import{b7 as B,u as $,O as R,aS as v,aT as n,bf as T,a$ as o,N as S,bc as x,r as A,b0 as i,ba as r,aB as V,aY as c,b9 as F,bg as P,bh as W,c as z,a_ as D,bQ as E,aX as M}from"./index-xnhGKCfe.js";import{L as O}from"./index-BCXnwPbG.js";import{P as Q}from"./index-97-mhYEo.js";import{u as U}from"./useTurntableState-DxRZc_YX.js";import{c as X}from"./currency-DTUBf2lI.js";import{_ as Y}from"./index.vue_vue_type_style_index_0_lang-9szultRB.js";import"./use-tab-status-C1dTAhJi.js";import"./pre-D84pmYLY.js";import"./useProtocol-DJp7lFWi.js";const j={class:"history"},q={class:"tabs flex flex-center"},G={class:"icon-title"},H=["src"],J={class:"title"},K={class:"time"},Z={key:0,class:"amount"},ee={key:1,class:"spinText"},ae=B({__name:"index",setup(se){const{recordList:p,spinRecordList:_,getSpinRecordList:m,getRecordList:g,loading:d,finished:h,pageInfo:k,menuArr:f,initImg:L,whellText:C}=U(),{t:u}=$(),t=A(0),y=s=>{t.value!==s&&(k.pageNo=1,h.value=!1,d.value=!1,t.value=s,s===0?(_.value=[],g()):(p.value=[],m()))},N=s=>{var a,l;return t.value===0?((a=f.find(e=>e.type===s-1))==null?void 0:a.icon)||"":((l=f.find(e=>e.type===s))==null?void 0:l.icon)||""},I=s=>{var a;return t.value===0?C[s]||"":((a=f.find(l=>l.type===s))==null?void 0:a.name)||""},b=z(()=>t.value===0?p.value:_.value),w=async()=>{t.value===0?await g():await m()};return R(()=>{w(),L()}),(s,a)=>{const l=O;return n(),v(Q,{"is-overfllow":!1},{default:T(()=>[o("div",j,[o("div",q,[o("div",{class:x(["tab",{active:t.value===0}]),onClick:a[0]||(a[0]=e=>y(0))},i(r(u)("t685")),3),o("div",{class:x(["tab",{active:t.value===1}]),onClick:a[1]||(a[1]=e=>y(1))},i(r(u)("t686")),3)]),S(l,{loading:r(d),"onUpdate:loading":a[2]||(a[2]=e=>V(d)?d.value=e:null),finished:r(h),onLoad:w,"finished-text":"","loading-text":"loading"},{default:T(()=>[(n(!0),c(P,null,W(b.value,e=>(n(),c("div",{key:e.orderNo,class:"record-card"},[o("div",G,[e.rewardType===1?(n(),v(D,{key:0,name:"icon_wheelwin",class:"iconClass"})):(n(),c("img",{key:1,src:N(e.rewardType||e.rechargeWheelType),class:"wheelIcon"},null,8,H)),o("div",null,[o("div",J,i(I(e.rewardType||e.rechargeWheelType)),1),o("div",K,i(r(E)(e.createTime)),1)])]),e.rewardType===1&&t.value===0?(n(),c("div",Z,i(r(X)(e.rewardAmount)),1)):(n(),c("div",ee,"+"+i(e.rewardAmount||e.spinCount)+" "+i(r(u)("t780")),1))]))),128)),b.value.length===0?(n(),v(Y,{key:0,text:r(u)("t781")},null,8,["text"])):F("",!0)]),_:1},8,["loading","finished"])])]),_:1})}}}),fe=M(ae,[["__scopeId","data-v-73da5d12"]]);export{fe as default};
