import{C as R,x as y,I as g,E as m,F as t,aw as F,K as l,al as T,v as L,r as I,D as B,ax as j,G as x,H as z,M as w,as as W,ay as M,J as _,am as V,au as $,N as O,y as E}from"./common.modules-7b90237f.js";import{r as G}from"./page-activity-DailySignIn-63fcaba2.js";import{_ as C,m as D,n as H,c as A,g as N,b as J}from"./page-activity-ActivityDetail-27bd7cf0.js";const K={key:0,class:"step"},U=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(f){const e=f,u=y(()=>({background:e.trackColor,height:`${e.strokeWidth}px`,"border-radius":`${e.strokeWidth}px`})),r=y(()=>{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=y(()=>`${e.numerical}/${e.total}`);return(n,k)=>(g(),m("div",{class:"progress",style:F(u.value)},[t("div",{class:"line",style:F(r.value)},null,4),f.isShowStep?(g(),m("div",K,l(p.value),1)):T("v-if",!0)],4))}});const q=C(U,[["__scopeId","data-v-bff59ba2"],["__file","/usr/local/jenkins-prod/workspace/ar079-india-tashanwin/src/components/common/Progress.vue"]]),Q={class:"head"},X={class:"title"},Y={class:"orange"},Z={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(f,{emit:e}){const{t:u}=L(),r=I(!1),p=I("");let n=!1;const{receiveFirstRechargeReward:k,ActiveSotre:S}=D(),{closeFirstSave:b}=H(),d=(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":"")},v=o=>{const{canReceive:s,isFinshed:c}=o;return u(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 k(o.id);n=!1,i&&(S.value.receiveAmount=o.rewardAmount,S.value.showReceiveDialog=!0,b())};return(o,s)=>{const c=B("van-dialog"),i=j("lazy");return g(),m(x,null,[(g(!0),m(x,null,z(f.list,(a,P)=>(g(),m("div",{key:P,class:"first_list-item"},[t("div",Q,[t("div",X,[M(l(o.$t("firstSave")),1),t("span",null,l(a.rechargeAmount),1)]),t("div",Y,"+ "+l(_(A)(a.rewardAmount)),1)]),t("div",Z,l(o.$t("firstSaveT",[a.rechargeAmount,a.rewardAmount])),1),t("div",ee,[w(q,{"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",[d(a,f.isRule)]]),onClick:ue=>h(a)},l(v(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:W(()=>[t("div",se,[$(t("img",null,null,512),[[i,_(N)("public","succeed")]]),t("div",ae,l(o.$t("awardsReceived")),1),t("div",re,[$(t("img",null,null,512),[[i,_(N)("wallet","balance")]]),t("span",null,l(_(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,_(J)("activity/DailyTask","close")]])])])]),_:1},8,["show"])],64)}}});const ne=C(oe,[["__scopeId","data-v-48dabef8"],["__file","/usr/local/jenkins-prod/workspace/ar079-india-tashanwin/src/components/Activity/FirstRecharge/listItem.vue"]]),ie={class:"first_list"},le=R({__name:"index",setup(f){const{ActiveSotre:e,getFirstRechargeList:u}=D(),{t:r}=L(),p=O(),n=y(()=>{var d;return(d=e.value.FirstRechargeList)!=null&&d.length?e.value.FirstRechargeList.reduce((v,h)=>Math.max(v.rewardAmount||v,h.rewardAmount)):"0"}),k=sessionStorage.getItem("fa1")||"1.00",S=y(()=>[r("firstSave1",[A(n.value)]),r("firstSave2"),r("firstSave3"),r("firstSave4",[k]),r("firstSave5"),r("firstSave6")]),b=()=>{p.push({name:"Recharge"})};return E(()=>{u()}),(d,v)=>{const h=B("NavBar");return g(),m(x,null,[w(h,{title:d.$t("firstSaveTitle"),"left-arrow":"",onClickLeft:v[0]||(v[0]=o=>_(p).go(-1))},null,8,["title"]),t("div",ie,[w(ne,{list:_(e).FirstRechargeList,onGorecharge:b},null,8,["list"])]),w(G,{name:d.$t("firstSaveRule"),tiplist:S.value},null,8,["name","tiplist"])],64)}}});const ce=C(le,[["__scopeId","data-v-c0418dcc"],["__file","/usr/local/jenkins-prod/workspace/ar079-india-tashanwin/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};
