"use strict";(globalThis.webpackChunkinfinity_hitab_client=globalThis.webpackChunkinfinity_hitab_client||[]).push([[882],{50882:(e,i,t)=>{t.r(i),t.d(i,{default:()=>U});var n=t(8929),o=t(57268),s=t(29445),l=t(94209),r=t(45069),a=t(95329),c=t(10435),p=t(6594),d=t(91294),u=t(63477);const x={class:"sub-info h-full py-[40px]"},b={class:"mt-[10px] px-[70px]"},f={class:"flex items-center justify-between border-b-[1px] border-color-m2 border-opacity-[0.06] py-[20px] font-ali-55 leading-none text-color-t2"},y={class:""},_={class:""},v=(0,o._)("span",null,"Expire date: ",-1),m={class:"border-b-[1px] border-color-m2 border-opacity-[0.06] py-[10px] text-color-t1"},g={class:"flex flex-col leading-[1.414]"},w=(0,o._)("span",null,"Modify subscription plan",-1),S={key:0,class:"font-ali-55 text-[12px] text-color-t3"},h=(0,o._)("i",{class:"iconfont icon-arrow_icon text-[12px]"},null,-1),k=[(0,o._)("div",{class:""},"Update card information",-1),(0,o._)("i",{class:"iconfont icon-arrow_icon text-[12px]"},null,-1)],P=[(0,o._)("div",{class:""},"Billing history",-1),(0,o._)("i",{class:"iconfont icon-arrow_icon text-[12px]"},null,-1)],U=(0,o.aZ)({__name:"sub-info",setup(e){const i=(0,r.o)(),t=(0,d.V)(),U=(0,a.useUserStore)(),V=(0,p.t)(),{user:C}=(0,c.Jk)(U),D=()=>{t.settingsShow=!1,V.setShowPayManual("modifyPlan")},j=(0,s.iH)(!1),H=async()=>{if(j.value)return;j.value=!0;const e=await V.modifyPayMethod();j.value=!1,e&&(0,u.Yo)(e,!0)},I=()=>{i.settingHomeView="billHistory"},T=(0,o.Fl)((()=>{if(!U.user.nextVipPlanId||U.user.nextVipPlanId===U.user.vipPlanId)return"";const e=V.prices.find((e=>e.id===U.user.nextVipPlanId));return e?e.nickname:""}));return(0,o.bv)((()=>{0===V.prices.length&&V.getPrices()})),(e,t)=>{const r=n.Z;return(0,o.wg)(),(0,o.iD)("section",x,[(0,o.Wm)(r,{class:"px-[70px]",title:"Subscription information",onBack:t[0]||(t[0]=e=>(0,s.SU)(i).settingHomeView="backup")}),(0,o._)("div",b,[(0,o._)("div",f,[(0,o._)("div",y,(0,l.toDisplayString)((0,s.SU)(C).vipPlan),1),(0,o._)("div",_,[v,(0,o._)("span",null,(0,l.toDisplayString)((0,s.SU)(C).vipEndTimeStr),1)])]),(0,o._)("div",m,[(0,o._)("div",{class:"flex cursor-pointer items-center justify-between py-[10px] leading-none",onClick:D},[(0,o._)("div",g,[w,(0,s.SU)(T)?((0,o.wg)(),(0,o.iD)("span",S,(0,l.toDisplayString)(` ${(0,s.SU)(T)}, effective date: ${(0,s.SU)(u.F8)((0,s.SU)(U).user.nextVipPlanTime)}`),1)):(0,o.kq)("",!0)]),h])]),(0,o._)("div",{class:"border-b-[1px] border-color-m2 border-opacity-[0.06] py-[10px] text-color-t1"},[(0,o._)("div",{class:"flex cursor-pointer items-center justify-between py-[10px] leading-none",onClick:H},k)]),(0,o._)("div",{class:"border-b-[1px] border-color-m2 border-opacity-[0.06] py-[10px] text-color-t1"},[(0,o._)("div",{class:"flex cursor-pointer items-center justify-between py-[10px] leading-none",onClick:I},P)])])])}}})}}]);