"use strict";(globalThis.webpackChunkinfinity_hitab_client=globalThis.webpackChunkinfinity_hitab_client||[]).push([[6905],{16905:(e,l,t)=>{t.r(l),t.d(l,{default:()=>C});var o=t(8929),i=t(57268),n=t(29445),a=t(94209),r=t(7886),s=t(94630),p=t(19012);const c={key:0,class:"flex h-[22px] items-center"},x={class:"flex cursor-pointer items-center text-color-t2"},d={class:"font-ali-55 text-[14px] leading-[20px] text-color-t2"},u={class:"flex flex-col rounded-[8px] bg-color-b5 p-[8px] shadow-popover dark:bg-[#2C2C2C]"},g=["onClick"],f={class:"font-ali-55 text-[14px] leading-[20px] text-color-t2"},v={class:"hide-scroll mt-[24px] h-[514px] overflow-y-auto"},h={class:"mb-[24px] inline-block w-[360px] rounded-[16px] border border-color-m2 border-opacity-[0.08] bg-[#fff] px-[20px] py-[8px] dark:bg-opacity-[0.08]"},y={class:"flex flex-col"},m={class:"flex h-[20px] items-center"},b=["src"],k={class:"ml-[8px] flex-1 font-ali-65 text-[14px] leading-[20px] text-color-t2"},w={key:0,class:"mt-[2px] font-ali-55 text-[14px] leading-[17px] text-color-t3"},_={key:0,class:"mt-[12px] flex flex-col gap-[12px]"},D={class:"flex-1 font-ali-55 text-[14px] leading-[20px] text-color-t3"},q={class:"font-ali-55 text-[14px] leading-[17px] text-color-t3"},S=(0,i.aZ)({__name:"my-quotas",props:{changeView:null},setup(e){const l=e,t=(0,r.bl)(),S=[{value:r.Eq.Vip,text:"会员权益"},{value:r.Eq.Trial,text:"免费权益"}],C=(0,n.iH)(0),H=(0,n.iH)(!1),E=(0,i.Fl)((()=>{const e=Object.keys(t.quotas),l=t.type===r.Eq.Vip?S[C.value].value:null;return e.filter((e=>{if(!l)return!0;const o=t.quotasInfo[e];return(null==o?void 0:o.type)===l})).map((e=>{const l=t.quotasInfo[e];return{key:e,name:null==l?void 0:l.name,icon:null==l?void 0:l.icon,type:null==l?void 0:l.type,children:t.quotas[e]}})).filter((e=>e.children.length>0))})),T=()=>{l.changeView(p.k.INDEX)};return(e,l)=>{const p=o.Z;return(0,i.wg)(),(0,i.iD)(i.HY,null,[(0,i.Wm)(p,{title:"我的全部权益","need-back":!0,onBack:T},{right:(0,i.w5)((()=>[(0,n.SU)(t).type===(0,n.SU)(r.Eq).Vip?((0,i.wg)(),(0,i.iD)("div",c,[(0,i.Wm)(s.Z,{show:H.value,"onUpdate:show":l[0]||(l[0]=e=>H.value=e),placement:"bottom-end"},{reference:(0,i.w5)((()=>[(0,i._)("div",x,[(0,i._)("span",d,(0,a.toDisplayString)(S[C.value].text),1),(0,i._)("i",{class:(0,a.normalizeClass)(["iconfont icon-arrow_down_12 ml-[8px] text-[12px] transition",{"rotate-180":H.value}])},null,2)])])),default:(0,i.w5)((()=>[(0,i._)("div",u,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(S,((e,l)=>(0,i._)("div",{key:e.value,class:"flex h-[36px] cursor-pointer items-center rounded-[4px] px-[12px] hover:bg-color-m2 hover:bg-opacity-[0.06]",onClick:e=>(e=>{C.value=e,H.value=!1})(l)},[(0,i._)("span",f,(0,a.toDisplayString)(e.text),1)],8,g))),64))])])),_:1},8,["show"])])):(0,i.kq)("",!0)])),_:1}),(0,i._)("div",v,[(0,i._)("div",h,[(0,i._)("div",y,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,n.SU)(E),((e,l)=>{var t;return(0,i.wg)(),(0,i.iD)("div",{key:e.key,class:(0,a.normalizeClass)(["py-[12px]",{"border-b border-color-m2 border-opacity-[0.08]":l!==(0,n.SU)(E).length-1}])},[(0,i._)("div",m,[(0,i._)("img",{src:e.icon,class:"h-[20px] w-[20px] rounded-[6px]"},null,8,b),(0,i._)("span",k,(0,a.toDisplayString)(e.name),1),1===e.children.length?((0,i.wg)(),(0,i.iD)("span",w,(0,a.toDisplayString)(e.children[0].restText),1)):(0,i.kq)("",!0)]),(null===(t=e.children)||void 0===t?void 0:t.length)>1?((0,i.wg)(),(0,i.iD)("div",_,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,(e=>((0,i.wg)(),(0,i.iD)("div",{key:e.key,class:"ml-[28px] flex h-[20px] items-center"},[(0,i._)("span",D,(0,a.toDisplayString)(e.description),1),(0,i._)("span",q,(0,a.toDisplayString)(e.restText),1)])))),128))])):(0,i.kq)("",!0)],2)})),128))])])])],64)}}}),C=S}}]);