import{d as a,u as s,e,r as l,z as r,o as t,f as o,P as i,g as n,F as c,j as d,l as p,h as u,Y as v,X as f,Q as _,R as g,N as b,t as h,I as m,ad as w,O as I,a3 as y,B as x,C as U,A as j,_ as k}from"./index_1730355987.js";import{_ as R}from"./index_173035598733.js";const A={class:"page"},L={class:"page-body"},C={class:"left flex-ct"},V={class:"right"},P={style:{color:"#f3e615"}},B=(a=>(x("data-v-c24b12f5"),a=a(),U(),a))((()=>n("i",null,"R$ ",-1))),E={style:{"text-align":"right"}},N=k(a({__name:"levelReceive",setup(a){const x=s(),U=e((()=>x.vipInfo));l([]);const k=e((()=>{let a=[];if(U.value&&U.value.rows&&(a=[...U.value.rows]),a&&a.length){if(a.sort(((a,s)=>a.lv-s.lv)),a=a.filter((a=>a.award.length)),a.forEach((a=>{a.lv<=U.value.myLv?a.status=1:a.status=3})),!U.value.vipLvAwardValue)return a;a.forEach((a=>{-1!==U.value.vipLvAwardValue.findIndex((s=>s==a.lv))&&(a.status=2)}))}let s=Array.from(new Set(a.map((a=>a.award[0].propId))));return r.getPropsCache({propIds:s}).then((s=>{if(0!=s.code)return a;for(let e=0;e<a.length;e++)for(let l=0;l<s.data.props.length;l++)a[e].award[0]&&a[e].award[0].propId===s.data.props[l]._id?a[e].iconUrl=s.data.props[l].iconUrl:a[e].iconUrl="perfil/jinbi_04.png"})),a}));return(a,s)=>{const e=R,l=j,U=m,N=w;return t(),o("div",A,[i(e,{title:"Level Bonus"}),n("div",L,[(t(!0),o(c,null,d(k.value,((a,s)=>(t(),o("div",{class:"block flex-sb",key:s},[n("div",C,["perfil/jinbi_04.png"!=a.iconUrl&&a.iconUrl?(t(),p(U,{key:1,class:"icon",src:u(I)(a.iconUrl)},null,8,["src"])):(t(),p(l,{key:0,class:"icon",src:"perfil/jinbi_04.png"}))]),n("div",V,[n("span",null,"VIP "+v(a.lv),1),n("span",P,[B,f(v(u(y)(a.award[0].num/1e4)),1)]),n("div",E,[_(i(N,{color:"#676e6e"},{default:b((()=>[f(" Recebido ")])),_:2},1536),[[g,2==a.status]]),_(i(N,{color:"#1a795b"},{default:b((()=>[f(" Não completado ")])),_:2},1536),[[g,3==a.status]]),_(i(N,{color:"#a9792e",onClick:s=>{return e=a._id,void r.getVipLvAward({_id:e}).then((a=>{0===a.code&&(h("Recebido com sucesso"),x.getUserInfo())}));var e}},{default:b((()=>[f(" Receber ")])),_:2},1032,["onClick"]),[[g,1==a.status]])])])])))),128))])])}}}),[["__scopeId","data-v-c24b12f5"]]);export{N as default};
