import{b7 as m,u as y,d as w,aY as c,aT as d,a$ as s,b9 as k,b0 as o,r as b,ba as _,bg as I,d9 as g,f as R,aX as T}from"./index-xnhGKCfe.js";import{c as h}from"./currency-DTUBf2lI.js";const x={class:"weekPop"},C={class:"title"},P={class:"text"},W={key:0,class:"boxImg"},$={key:1,class:"boxImg"},A={class:"amount"},B={key:0,class:"btnTip"},D=m({__name:"WeekCardPop",props:{popupInfo:{default:()=>({dailyRewardAmount:0,rewardDays:0,cardType:0})}},emits:["receiveReward"],setup(n,{emit:i}){const r=R(),{t:l}=y(),u=i,{getARGameAndPlatWalletList:p}=w(),v=n,e=b(1),f=async()=>{const{cardType:t}=v.popupInfo;if(e.value===2)return u("receiveReward",t);if(e.value!==3){e.value=3;try{const{code:a}=await g({cardType:t});a===0?(e.value=2,p(),r.success(l("t246"))):e.value=1}catch{e.value=1}}};return(t,a)=>(d(),c(I,null,[s("section",x,[s("div",null,[s("div",C,o(n.popupInfo.cardType===1?t.$t("t1024"):t.$t("t1025")),1),s("p",P,o(n.popupInfo.rewardDays)+" "+o(t.$t("t1032")),1),e.value===1?(d(),c("div",W,[...a[0]||(a[0]=[s("div",{class:"boxGift boxSwing"},null,-1)])])):(d(),c("div",$,[a[1]||(a[1]=s("div",{class:"gifBoxOpen"},null,-1)),s("div",A,o(_(h)(n.popupInfo.dailyRewardAmount)),1)]))]),e.value===1?(d(),c("div",B,o(t.$t("t1033")),1)):k("",!0)]),s("div",{class:"weekWindow",onClick:f})],64))}}),L=T(D,[["__scopeId","data-v-9c805d22"]]);export{L as default};
