import{U as R,O as w,o as g,m,p as t,ae as F,Y as l,ac as T,P as B,r as I,V as L,ah as D,W as x,X as W,Z as y,am as z,an as M,M as f,ag as V,ai as $,$ as O,E}from"./common.modules-219f1756.js";import{r as U}from"./page-activity-DailySignIn-96ec389f.js";import{_ as C,i as j,k as G,c as A,g as N,a as H}from"./page-activity-ActivityDetail-346b11b6.js";window.getBuildInfo=function(){return{buildTime:"3/15/2025, 9:01:28 PM",branch:" commitId:c8ca98fce6fc864cab311715d288030620d0dc9f"}};const X={key:0,class:"step"},Y=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=w(()=>({background:e.trackColor,height:`${e.strokeWidth}px`,"border-radius":`${e.strokeWidth}px`})),r=w(()=>{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`}}),p=w(()=>`${e.numerical}/${e.total}`);return(n,b)=>(g(),m("div",{class:"progress",style:F(d.value)},[t("div",{class:"line",style:F(r.value)},null,4),u.isShowStep?(g(),m("div",X,l(p.value),1)):T("v-if",!0)],4))}});const Z=C(Y,[["__scopeId","data-v-bff59ba2"],["__file","/usr/local/jenkins-prod/workspace/ar077-india-jalwa/src/components/common/Progress.vue"]]),q={class:"head"},J={class:"title"},K={class:"orange"},Q={class:"description"},ee={class:"foot"},te=["onClick"],se={class:"dialog-wrapper"},ae={class:"dialog-title"},re={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}=B(),r=I(!1),p=I("");let n=!1;const{receiveFirstRechargeReward:b,ActiveSotre:k}=j(),{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 b(o.id);n=!1,i&&(k.value.receiveAmount=o.rewardAmount,k.value.showReceiveDialog=!0,S())};return(o,s)=>{const c=L("van-dialog"),i=D("lazy");return g(),m(x,null,[(g(!0),m(x,null,W(u.list,(a,P)=>(g(),m("div",{key:P,class:"first_list-item"},[t("div",q,[t("div",J,[M(l(o.$t("firstSave")),1),t("span",null,l(a.rechargeAmount),1)]),t("div",K,"+ "+l(f(A)(a.rewardAmount)),1)]),t("div",Q,l(o.$t("firstSaveT",[a.rechargeAmount,a.rewardAmount])),1),t("div",ee,[y(Z,{"stroke-width":16,color:"var(--norm_secondary-color)",total:a.rechargeAmount,numerical:a.canReceive?a.rechargeAmount:0},null,8,["total","numerical"]),t("div",{class:V(["btn",[v(a,u.isRule)]]),onClick:ue=>h(a)},l(_(a)),11,te)])]))),128)),y(c,{show:r.value,"onUpdate:show":s[2]||(s[2]=a=>r.value=a),"show-confirm-button":!1,className:"noOverHidden"},{default:z(()=>[t("div",se,[$(t("img",null,null,512),[[i,f(N)("public","succeed")]]),t("div",ae,l(o.$t("awardsReceived")),1),t("div",re,[$(t("img",null,null,512),[[i,f(N)("wallet","balance")]]),t("span",null,l(f(A)(p.value)),1)]),t("div",{class:"dialog-btn",onClick:s[0]||(s[0]=a=>r.value=!1)},l(o.$t("confirm")),1),t("div",{class:"dialog-footer",onClick:s[1]||(s[1]=a=>r.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","/usr/local/jenkins-prod/workspace/ar077-india-jalwa/src/components/Activity/FirstRecharge/listItem.vue"]]),ie={class:"first_list"},le=R({__name:"index",setup(u){const{ActiveSotre:e,getFirstRechargeList:d}=j(),{t:r}=B(),p=O(),n=w(()=>{var v;return(v=e.value.FirstRechargeList)!=null&&v.length?e.value.FirstRechargeList.reduce((_,h)=>Math.max(_.rewardAmount||_,h.rewardAmount)):"0"}),b=sessionStorage.getItem("fa1")||"1.00",k=w(()=>[r("firstSave1",[A(n.value)]),r("firstSave2"),r("firstSave3"),r("firstSave4",[b]),r("firstSave5"),r("firstSave6")]),S=()=>{p.push({name:"Recharge"})};return E(()=>{d()}),(v,_)=>{const h=L("NavBar");return g(),m(x,null,[y(h,{title:v.$t("firstSaveTitle"),"left-arrow":"",onClickLeft:_[0]||(_[0]=o=>f(p).go(-1))},null,8,["title"]),t("div",ie,[y(ne,{list:f(e).FirstRechargeList,onGorecharge:S},null,8,["list"])]),y(U,{name:v.$t("firstSaveRule"),tiplist:k.value},null,8,["name","tiplist"])],64)}}});const ce=C(le,[["__scopeId","data-v-c0418dcc"],["__file","/usr/local/jenkins-prod/workspace/ar077-india-jalwa/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-a0b117e6.js.map
