import{d as a,u as e,q as s,a as t,c as l,w as u,i as n,b as c,e as o,B as r,G as d,f as m,h as i,t as f,z as _,l as v,m as p,p as g,s as x,H as b,y as k,I as w}from"./index-Co9nPWLO.js";import{_ as C}from"./_plugin-vue_export-helper.BCo6x5W8.js";const I=C(a({__name:"index",setup(a){const C=e(),I=s(()=>{var a;return`level-${(null==(a=C.memberStatus)?void 0:a.level)||0}`}),h=s(()=>{var a;return(null==(a=C.memberStatus)?void 0:a.levelName)||"免费用户"});function y(){g({url:"/pages/member/index"})}function S(){x({url:"/pages/history/index"})}function q(){g({url:"/pages/albums/index"})}function L(){g({url:"/pages/book-generator/index"})}function j(){b({title:"关于AI有声书",content:"AI有声书是一款智能文本转语音工具，帮助您轻松制作高质量音频内容。\n\n版本: 1.0.0",showCancel:!1})}function A(){b({title:"意见反馈",content:"如有问题或建议，请联系客服：\n邮箱：support@example.com",showCancel:!1})}function z(){b({title:"确认退出",content:"确定要退出登录吗？",success:a=>{a.confirm&&(C.logout(),k({title:"已退出登录",icon:"success"}),w({url:"/pages/login/index"}))}})}return t(()=>{C.isLoggedIn&&C.fetchMemberStatus()}),(a,e)=>{const s=d,t=m,g=n,x=p;return c(),l(g,{class:"page"},{default:u(()=>[o(g,{class:"user-card"},{default:u(()=>[o(g,{class:"user-info"},{default:u(()=>{var a;return[(null==(a=r(C).userInfo)?void 0:a.avatar)?(c(),l(s,{key:0,src:r(C).userInfo.avatar,class:"avatar",mode:"aspectFill"},null,8,["src"])):(c(),l(g,{key:1,class:"avatar-placeholder"},{default:u(()=>[o(t,{class:"avatar-text"},{default:u(()=>[i("👤")]),_:1})]),_:1})),o(g,{class:"user-text"},{default:u(()=>[o(t,{class:"nickname"},{default:u(()=>{var a;return[i(f((null==(a=r(C).userInfo)?void 0:a.nickname)||"未登录"),1)]}),_:1}),o(g,{class:_(["member-badge",I.value])},{default:u(()=>[o(t,{class:"member-text"},{default:u(()=>[i(f(h.value),1)]),_:1})]),_:1},8,["class"])]),_:1})]}),_:1}),r(C).memberStatus?(c(),l(g,{key:0,class:"stats-row"},{default:u(()=>[o(g,{class:"stat-item"},{default:u(()=>[o(t,{class:"stat-value"},{default:u(()=>[i(f(r(C).memberStatus.quota.dailyRemaining),1)]),_:1}),o(t,{class:"stat-label"},{default:u(()=>[i("今日剩余次数")]),_:1})]),_:1}),o(g,{class:"stat-divider"}),o(g,{class:"stat-item"},{default:u(()=>[o(t,{class:"stat-value"},{default:u(()=>[i(f(0===r(C).memberStatus.quota.wordLimit?"∞":r(C).memberStatus.quota.wordLimit),1)]),_:1}),o(t,{class:"stat-label"},{default:u(()=>[i("单次字数上限")]),_:1})]),_:1})]),_:1})):v("",!0)]),_:1}),o(g,{class:"menu-section"},{default:u(()=>[o(g,{class:"menu-item",onClick:y},{default:u(()=>[o(t,{class:"menu-icon"},{default:u(()=>[i("👑")]),_:1}),o(t,{class:"menu-text"},{default:u(()=>[i("会员中心")]),_:1}),o(t,{class:"menu-arrow"},{default:u(()=>[i("›")]),_:1})]),_:1}),o(g,{class:"menu-item",onClick:S},{default:u(()=>[o(t,{class:"menu-icon"},{default:u(()=>[i("📜")]),_:1}),o(t,{class:"menu-text"},{default:u(()=>[i("历史记录")]),_:1}),o(t,{class:"menu-arrow"},{default:u(()=>[i("›")]),_:1})]),_:1}),o(g,{class:"menu-item",onClick:q},{default:u(()=>[o(t,{class:"menu-icon"},{default:u(()=>[i("📚")]),_:1}),o(t,{class:"menu-text"},{default:u(()=>[i("我的专辑")]),_:1}),o(t,{class:"menu-arrow"},{default:u(()=>[i("›")]),_:1})]),_:1}),o(g,{class:"menu-item",onClick:L},{default:u(()=>[o(t,{class:"menu-icon"},{default:u(()=>[i("📖")]),_:1}),o(t,{class:"menu-text"},{default:u(()=>[i("书籍生成")]),_:1}),o(t,{class:"menu-tag"},{default:u(()=>[i("新功能")]),_:1}),o(t,{class:"menu-arrow"},{default:u(()=>[i("›")]),_:1})]),_:1}),o(g,{class:"menu-item",onClick:j},{default:u(()=>[o(t,{class:"menu-icon"},{default:u(()=>[i("ℹ️")]),_:1}),o(t,{class:"menu-text"},{default:u(()=>[i("关于我们")]),_:1}),o(t,{class:"menu-arrow"},{default:u(()=>[i("›")]),_:1})]),_:1}),o(g,{class:"menu-item",onClick:A},{default:u(()=>[o(t,{class:"menu-icon"},{default:u(()=>[i("💬")]),_:1}),o(t,{class:"menu-text"},{default:u(()=>[i("意见反馈")]),_:1}),o(t,{class:"menu-arrow"},{default:u(()=>[i("›")]),_:1})]),_:1})]),_:1}),r(C).isLoggedIn?(c(),l(g,{key:0,class:"logout-section"},{default:u(()=>[o(x,{class:"logout-btn",onClick:z},{default:u(()=>[i("退出登录")]),_:1})]),_:1})):v("",!0)]),_:1})}}}),[["__scopeId","data-v-ae152623"]]);export{I as default};
