import{R,M as b,o as m,m as p,p as t,ab as F,W as l,a9 as j,N,r as I,T as L,ae as P,U as A,V as W,X as w,aj as z,ak as M,J as f,ad as V,af as $,Y as E,C as O}from"./common.modules-7c536f9e.js";import{r as U}from"./page-activity-DailySignIn-6954e5ad.js";import{_ as C,i as T,k as G,c as x,g as B,a as H}from"./page-activity-ActivityDetail-6a89b82d.js";window.getBuildInfo=function(){return{buildTime:"3/7/2025, 12:42:23 AM",branch:" commitId:4ed4cb029a37f3fbed1ddd816d4bb072e9fe821e"}};const J={key:0,class:"step"},X=R({__name:"Progress",props:{strokeWidth:{type:Number,default:12},total:{type:Number,default:0},numerical:{type:Number,default:0},color:{type:String,default:"var(--text_color_L4)"},trackColor:{type:String,default:"var(--bg_color_L1)"},isShowStep:{type:Boolean,default:!0}},setup(u){const e=u,d=b(()=>({background:e.trackColor,height:`${e.strokeWidth}px`,"border-radius":`${e.strokeWidth}px`})),a=b(()=>{let n="0";return e.numerical==0||e.total==0?n="0":e.numerical>e.total?n="100":n=String((e.numerical/e.total*100).toFixed(2)),{background:e.color,width:`${n}%`,height:`${e.strokeWidth}px`,"border-radius":`${e.strokeWidth}px`}}),g=b(()=>`${e.numerical}/${e.total}`);return(n,y)=>(m(),p("div",{class:"progress",style:F(d.value)},[t("div",{class:"line",style:F(a.value)},null,4),u.isShowStep?(m(),p("div",J,l(g.value),1)):j("v-if",!0)],4))}});const Y=C(X,[["__scopeId","data-v-bff59ba2"],["__file","/var/lib/jenkins/workspace/web-印度-ar013-okowin-电子版面/src/components/common/Progress.vue"]]),q={class:"head"},K={class:"title"},Q={class:"orange"},Z={class:"description"},ee={class:"foot"},te=["onClick"],se={class:"dialog-wrapper"},re={class:"dialog-title"},ae={class:"dialog-content"},oe=R({__name:"listItem",props:{list:{type:Array,default:()=>[{rewardAmount:123}]},isRule:{type:Boolean,default:!1}},emits:["gorecharge"],setup(u,{emit:e}){const{t:d}=N(),a=I(!1),g=I("");let n=!1;const{receiveFirstRechargeReward:y,ActiveSotre:k}=T(),{closeFirstSave:S}=G(),v=(o,s)=>{const{canReceive:c,isFinshed:i}=o;if(!c)return"n2"+(s?" rule":"");if(c&&!i)return"n1"+(s?" rule":"");if(i)return"n3"+(s?" rule":"");if(!i)return"n2"+(s?" rule":"")},_=o=>{const{canReceive:s,isFinshed:c}=o;return d(s?c?"claimed":"receive":"torecharge")},h=async o=>{const{canReceive:s,isFinshed:c}=o;if(!s)return e("gorecharge");if(c||n)return;n=!0;const i=await y(o.id);n=!1,i&&(k.value.receiveAmount=o.rewardAmount,k.value.showReceiveDialog=!0,S())};return(o,s)=>{const c=L("van-dialog"),i=P("lazy");return m(),p(A,null,[(m(!0),p(A,null,W(u.list,(r,D)=>(m(),p("div",{key:D,class:"first_list-item"},[t("div",q,[t("div",K,[M(l(o.$t("firstSave")),1),t("span",null,l(r.rechargeAmount),1)]),t("div",Q,"+ "+l(f(x)(r.rewardAmount)),1)]),t("div",Z,l(o.$t("firstSaveT",[r.rechargeAmount,r.rewardAmount])),1),t("div",ee,[w(Y,{"stroke-width":16,color:"var(--norm_secondary-color)",total:r.rechargeAmount,numerical:r.canReceive?r.rechargeAmount:0},null,8,["total","numerical"]),t("div",{class:V(["btn",[v(r,u.isRule)]]),onClick:ue=>h(r)},l(_(r)),11,te)])]))),128)),w(c,{show:a.value,"onUpdate:show":s[2]||(s[2]=r=>a.value=r),"show-confirm-button":!1,className:"noOverHidden"},{default:z(()=>[t("div",se,[$(t("img",null,null,512),[[i,f(B)("public","succeed")]]),t("div",re,l(o.$t("awardsReceived")),1),t("div",ae,[$(t("img",null,null,512),[[i,f(B)("wallet","balance")]]),t("span",null,l(f(x)(g.value)),1)]),t("div",{class:"dialog-btn",onClick:s[0]||(s[0]=r=>a.value=!1)},l(o.$t("confirm")),1),t("div",{class:"dialog-footer",onClick:s[1]||(s[1]=r=>a.value=!1)},[$(t("img",null,null,512),[[i,f(H)("activity/DailyTask","close")]])])])]),_:1},8,["show"])],64)}}});const ne=C(oe,[["__scopeId","data-v-48dabef8"],["__file","/var/lib/jenkins/workspace/web-印度-ar013-okowin-电子版面/src/components/Activity/FirstRecharge/listItem.vue"]]),ie={class:"first_list"},le=R({__name:"index",setup(u){const{ActiveSotre:e,getFirstRechargeList:d}=T(),{t:a}=N(),g=E(),n=b(()=>{var v;return(v=e.value.FirstRechargeList)!=null&&v.length?e.value.FirstRechargeList.reduce((_,h)=>Math.max(_.rewardAmount||_,h.rewardAmount)):"0"}),y=sessionStorage.getItem("fa1")||"1.00",k=b(()=>[a("firstSave1",[x(n.value)]),a("firstSave2"),a("firstSave3"),a("firstSave4",[y]),a("firstSave5"),a("firstSave6")]),S=()=>{g.push({name:"Recharge"})};return O(()=>{d()}),(v,_)=>{const h=L("NavBar");return m(),p(A,null,[w(h,{title:v.$t("firstSaveTitle"),"left-arrow":"",onClickLeft:_[0]||(_[0]=o=>f(g).go(-1))},null,8,["title"]),t("div",ie,[w(ne,{list:f(e).FirstRechargeList,onGorecharge:S},null,8,["list"])]),w(U,{name:v.$t("firstSaveRule"),tiplist:k.value},null,8,["name","tiplist"])],64)}}});const ce=C(le,[["__scopeId","data-v-c0418dcc"],["__file","/var/lib/jenkins/workspace/web-印度-ar013-okowin-电子版面/src/views/activity/FirstRecharge/index.vue"]]),fe=Object.freeze(Object.defineProperty({__proto__:null,default:ce},Symbol.toStringTag,{value:"Module"}));export{ne as f,fe as i};
//# sourceMappingURL=page-activity-FirstRecharge-a398b8dc.js.map
