import{f as a,A as s,B as e,C as l,h as t,g as o,j as r,o as n,D as u,k as c,w as i,E as v,F as d,G as p,H as h,I as m,J as b,v as f,c as k,K as y,r as g,a as w}from"./vue-c4996fb3.js";import{P as C}from"./index-76b22244.js";import"./withInstall-a23174bf.js";import"./useVModel-63d31bce.js";const _={class:"s-header-user-info-dropdown"},j={class:"small-userinfo"},x={class:"header"},I=["src"],U={class:"user-name"},A={class:"user-options-box"},D=["onClick"],G=v("div",{class:"line"},null,-1),L={class:"user-info"},P=["src"],R=a({__name:"UserDropdown",setup(a){const f={avatar:new URL("/assets/avatar-7b85ead6.svg",self.location).href},k=s(),y=e(),g=l(),w=t(!1),R=o((()=>g.getters["user/token"])),B=o((()=>g.getters["user/userInfo"])),E=[{label:"个人信息",value:""},{label:"创作记录",value:"/CreationRecord"},{label:"产品订单",value:""},{label:"合作咨询",value:""}],F=async()=>{R.value&&(await g.dispatch("user/Logout"),w.value=!1)};return r((()=>{(async()=>{g.dispatch("user/UserInfo")})()})),(a,s)=>(n(),u("div",null,[c(d(C),{placement:"left-bottom",overlayClassName:"user-popup","destroy-on-close":"",trigger:"click",visible:w.value,"onUpdate:visible":s[0]||(s[0]=a=>w.value=a)},{content:i((()=>{var a;return[v("div",_,[v("div",j,[v("div",x,[v("img",{class:"avatar",src:d(B).avatar?d(B).avatar:f.avatar,alt:""},null,8,I),v("span",U,p(null!=(a=d(B).name)?a:"---"),1)]),v("div",A,[(n(),u(h,null,m(E,(a=>v("div",{key:a.value,class:"user-option",onClick:s=>(a=>{if(!a.value)return;const s=y.resolve({path:a.value});window.open(s.href),w.value=!1})(a)},[v("div",{class:b(["real-option",{active:d(k).path==a.value}])},p(a.label),3)],8,D))),64))]),G,v("div",{class:"logout-box",onClick:F},"退出登录")])])]})),default:i((()=>[v("div",L,[v("img",{src:d(B).avatar?d(B).avatar:f.avatar,alt:""},null,8,P)])])),_:1},8,["visible"])]))}}),B={class:"custom-layout-head"},E={class:"layout-head-left"},F=v("span",null,"AI GPT",-1),H=["onClick"],J={class:"layout-head-right"},K=a({__name:"header",setup(a){const l=s(),o=e(),r=t(l.path);f((()=>l.path),(a=>{r.value=a}));const i=[{label:"首页",path:"/"}];return(a,s)=>(n(),u("div",B,[v("div",E,[F,(n(),u(h,null,m(i,(a=>v("div",{class:b(["layout-chose-button",{active:a.path===r.value}]),key:a.path,onClick:s=>(a=>{o.replace({path:a.path})})(a)},p(a.label),11,H))),64))]),v("div",J,[c(R)])]))}}),M={class:"custom-layout"},N={class:"custom-content narrow-scrollbar"},T={class:"center-box"},V=a({__name:"content",setup(a){const e=s();return(a,s)=>{const l=g("router-view");return n(),u("div",M,[d(e).meta.header?(n(),k(K,{key:0})):y("",!0),v("div",N,[v("div",T,[c(l,null,{default:i((({Component:a})=>[(n(),k(w(a)))])),_:1})])])])}}});export{V as default};
