import{U as R,O as b,o as g,m as p,p as t,af as F,Y as l,ad as D,P as N,r as I,V as L,ai as j,W as A,X as W,Z as w,an as z,ao as E,M as f,ah as M,aj as $,$ as V,E as O}from"./common.modules-7ef9f935.js";import{r as U}from"./page-activity-DailySignIn-ca25ffbf.js";import{_ as C,i as P,k as G,c as x,g as B,a as H}from"./page-activity-ActivityDetail-6651511c.js";window.getBuildInfo=function(){return{buildTime:"3/28/2025, 7:06:51 PM",branch:"origin/masterBranch/main commitId:afb5d46f657248d3137decf21a49f44fbff20383"}};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=b(()=>({background:e.trackColor,height:`${e.strokeWidth}px`,"border-radius":`${e.strokeWidth}px`})),r=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`}}),m=b(()=>`${e.numerical}/${e.total}`);return(n,y)=>(g(),p("div",{class:"progress",style:F(d.value)},[t("div",{class:"line",style:F(r.value)},null,4),u.isShowStep?(g(),p("div",X,l(m.value),1)):D("v-if",!0)],4))}});const Z=C(Y,[["__scopeId","data-v-bff59ba2"],["__file","/var/lib/jenkins/workspace/web-印度-ar050-daman-01/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}=N(),r=I(!1),m=I("");let n=!1;const{receiveFirstRechargeReward:y,ActiveSotre:k}=P(),{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=j("lazy");return g(),p(A,null,[(g(!0),p(A,null,W(u.list,(a,T)=>(g(),p("div",{key:T,class:"first_list-item"},[t("div",q,[t("div",J,[E(l(o.$t("firstSave")),1),t("span",null,l(a.rechargeAmount),1)]),t("div",K,"+ "+l(f(x)(a.rewardAmount)),1)]),t("div",Q,l(o.$t("firstSaveT",[a.rechargeAmount,a.rewardAmount])),1),t("div",ee,[w(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:M(["btn",[v(a,u.isRule)]]),onClick:ue=>h(a)},l(_(a)),11,te)])]))),128)),w(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(B)("public","succeed")]]),t("div",ae,l(o.$t("awardsReceived")),1),t("div",re,[$(t("img",null,null,512),[[i,f(B)("wallet","balance")]]),t("span",null,l(f(x)(m.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","/var/lib/jenkins/workspace/web-印度-ar050-daman-01/src/components/Activity/FirstRecharge/listItem.vue"]]),ie={class:"first_list"},le=R({__name:"index",setup(u){const{ActiveSotre:e,getFirstRechargeList:d}=P(),{t:r}=N(),m=V(),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(()=>[r("firstSave1",[x(n.value)]),r("firstSave2"),r("firstSave3"),r("firstSave4",[y]),r("firstSave5"),r("firstSave6")]),S=()=>{m.push({name:"Recharge"})};return O(()=>{d()}),(v,_)=>{const h=L("NavBar");return g(),p(A,null,[w(h,{title:v.$t("firstSaveTitle"),"left-arrow":"",onClickLeft:_[0]||(_[0]=o=>f(m).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-印度-ar050-daman-01/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-c30022f7.js.map
