1import{C as T,R as U}from"./Conditions-DK7fIVUH.js";import{H as $,bK as k,aE as i,bL as m,M as B,r as O}from"./index-Bjy973yk.js";import{g as F}from"./gift-yellow-box-BTzGVI4q.js";import{g as I,d as V,_ as G}from"./ui-lib-CrW2W_q1.js";import{b as W,ax as H,U as j,v as q,o as c,p as h,D as u,k as _,l as s,h as t,t as a,n as z,a as P,e as L,B as g,m as K,c as n}from"./vendors-BDUahsn7.js";const X={class:"text-center mb-0"},Z={class:"text-center text-color--menu-active"},J={class:"flex flex-col gap-8"},Q={class:"flex justify-between items-center text-xs"},Y={class:"flex text-white"},ee={class:"font-bold text-white"},te={key:0,class:"flex items-center justify-between py-8 border-neutral-200/50 border-t"},se={class:"font__caption-2--normal color-text-body"},ae={class:"font__caption-2--bold"},re={key:0,class:"text-right font__caption-2--bold"},oe={class:"flex flex-col gap-16 mt-8 md:mt-0"},le=W({__name:"VipProgramLevelInfoModal",props:{closeHandler:{type:Function},title:{}},setup(b){const p=b,R=H(),{t:l}=j(),{isVip:w}=q($()),{getCurrentLevelImage:f,getUserLevel:r,getLevelCards:E,getNextLevelPointsLeft:M,parseReward:x}=k(),N=n(()=>{const e=l(`USER_LEVELS.${r.value.id}`);return w.value?e:l("VIP_PROGRAM.LEVEL_INFO_MODAL.LEVEL",{name:e,number:r.value.levelNumber})}),S=n(()=>E.value[r.value.id].reward),d=n(()=>Object.entries(E.value[r.value.id].rewards).reduce((e,[v,o])=>(o===U.Available&&e.countAvailable++,v==="weekly_cashback"&&o.includes("%")&&e.rewards.push({name:l(`VIP_PROGRAM.EXCLUSIVE_REWARDS.${v}`),value:o,triangle:!0}),e),{rewards:[],countAvailable:0})),A=n(()=>r.value.id===i||r.value.id===m),D=n(()=>({variant:A.value?"tertiary":"primary",size:"md"}));function y(){const e=r.value.id===i?i:m;p.closeHandler(),R.push({name:O.vipProgram,query:{onboarding:e}})}function C(){p.closeHandler(),R.push({name:O.vipProgramRewards})}return(e,v)=>(c(),h(B,{title:s(l)("VIP_PROGRAM.LEVEL_INFO_MODAL.TITLE")},{default:u(()=>[_(I,{src:s(f).src,"src-retina":s(f).srcRetina,class:"mx-auto w-80 h-80"},null,8,["src","src-retina"]),t("div",null,[t("h3",X,a(s(l)("VIP_PROGRAM.LEVEL_INFO_MODAL.SUB_TITLE")),1),t("h3",Z,a(N.value),1)]),t("div",J,[t("div",Q,[t("div",Y,[_(I,{src:s(F),class:"w-16 h-16 mr-4"},null,8,["src"]),t("span",null,a(e.$t("VIP_PROGRAM.LEVEL_INFO_MODAL.REWARD")),1)]),t("span",ee,a(s(x)(S.value)),1)]),t("div",null,[_(T,{conditions:d.value.rewards,"align-right":"",class:"border-t border-neutral-200/50"},{value:u(({condition:o})=>[t("span",{class:z({"green-triangle":o.triangle})},a(o.value),3)]),_:1},8,["conditions"]),s(r).id===s(i)?(c(),P("div",te,[t("p",se,a(e.$t("VIP_PROGRAM.LEVEL_INFO_MODAL.POINTS_LEFT_LABEL",{level:e.$t(`USER_LEVELS.${s(m)}`)})),1),t("p",ae,a(s(M))+" SP ",1)])):L("",!0)]),d.value.countAvailable?(c(),P("p",re,a(e.$t("VIP_PROGRAM.LEVEL_INFO_MODAL.REWARDS_AVAILABLE",{count:d.value.countAvailable})),1)):L("",!0)]),t("div",oe,[A.value?(c(),h(V,{key:0,"full-width":"",onClick:y},{default:u(()=>[g(a(e.$t("VIP_PROGRAM.LEVEL_INFO_MODAL.SHOW_AROUND")),1)]),_:1})):L("",!0),_(V,K(D.value,{"full-width":"",onClick:C}),{default:u(()=>[g(a(e.$t("VIP_PROGRAM.LEVEL_INFO_MODAL.VIEW_REWARDS")),1)]),_:1},16)])]),_:1},8,["title"]))}}),de=G(le,[["__scopeId","data-v-619eefe6"]]);export{de as default}; 2//# sourceMappingURL=VipProgramLevelInfoModal-DGhEFOTG.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.