import{i as e,n as t}from"./rolldown-runtime-ConPGZeh.js";import{$n as n,C as r,Dr as i,Gt as a,Kt as o,Lr as s,Nn as c,Qn as l,Rr as u,Sr as d,Ut as f,Wt as p,Zn as m,er as h,ii as g,ir as _,li as v,oi as y,or as b,rr as x,w as S}from"./vendor-primevue-D1-E3-0M.js";import{n as C,t as w}from"./Button-DXEyozJJ.js";import{ao as T,io as E,n as D,t as O}from"./dialogService-DIdX_hbW.js";import{n as k,t as A}from"./UserAvatar-DMQf5Lia.js";var j,M,N,P,F,I,L,R,z,B,V,H,U,W,G,K,q=t((()=>{c(),f(),a(),r(),k(),C(),E(),O(),j={class:`flex h-full flex-col`},M={class:`mb-2 text-2xl font-bold`},N={key:0,class:`flex flex-col gap-2`},P={class:`flex flex-col gap-0.5`},F={class:`font-medium`},I={class:`text-muted`},L={class:`flex flex-col gap-0.5`},R={class:`font-medium`},z={class:`text-muted`},B={class:`flex flex-col gap-0.5`},V={class:`font-medium`},H={class:`flex items-center gap-1 text-muted`},U={key:2,class:`mt-4 flex flex-col gap-2`},W={key:1,class:`flex flex-col gap-4`},G={class:`text-smoke-600`},K=b({__name:`UserPanel`,setup(e){let t=D(),{loading:r,isLoggedIn:a,isApiKeyLogin:c,isEmailProvider:f,userDisplayName:b,userEmail:C,userPhotoUrl:E,providerName:O,providerIcon:k,handleSignOut:K,handleSignIn:q,handleDeleteAccount:J}=T();return(e,T)=>{let D=i(`tooltip`);return d(),l(g(S),{value:`User`,class:`user-settings-container h-full`},{default:s(()=>[m(`div`,j,[m(`h2`,M,v(e.$t(`userSettings.title`)),1),_(g(p),{class:`mb-3`}),g(a)?(d(),h(`div`,N,[g(E)?(d(),l(A,{key:0,"photo-url":g(E),shape:`circle`,size:`large`},null,8,[`photo-url`])):n(``,!0),m(`div`,P,[m(`h3`,F,v(e.$t(`userSettings.name`)),1),m(`div`,I,v(g(b)||e.$t(`userSettings.notSet`)),1)]),m(`div`,L,[m(`h3`,R,v(e.$t(`userSettings.email`)),1),m(`span`,z,v(g(C)),1)]),m(`div`,B,[m(`h3`,V,v(e.$t(`userSettings.provider`)),1),m(`div`,H,[m(`i`,{class:y(g(k))},null,2),x(` `+v(g(O))+` `,1),g(f)?u((d(),l(w,{key:0,variant:`muted-textonly`,size:`icon-sm`,onClick:T[0]||=e=>g(t).showUpdatePasswordDialog()},{default:s(()=>T[1]||=[m(`i`,{class:`pi pi-pen-to-square`},null,-1)]),_:1})),[[D,{value:e.$t(`userSettings.updatePassword`),showDelay:300}]]):n(``,!0)])]),g(r)?(d(),l(g(o),{key:1,class:`mt-4 h-8 w-8`,style:{"--pc-spinner-color":`#000`}})):(d(),h(`div`,U,[_(w,{class:`w-32`,variant:`secondary`,onClick:g(K)},{default:s(()=>[T[2]||=m(`i`,{class:`pi pi-sign-out`},null,-1),x(` `+v(e.$t(`auth.signOut.signOut`)),1)]),_:1},8,[`onClick`]),g(c)?n(``,!0):(d(),l(w,{key:0,class:`w-fit`,variant:`destructive-textonly`,onClick:g(J)},{default:s(()=>[x(v(e.$t(`auth.deleteAccount.deleteAccount`)),1)]),_:1},8,[`onClick`]))]))])):(d(),h(`div`,W,[m(`p`,G,v(e.$t(`auth.login.title`)),1),_(w,{class:`w-52`,variant:`primary`,loading:g(r),onClick:g(q)},{default:s(()=>[T[3]||=m(`i`,{class:`pi pi-user`},null,-1),x(` `+v(e.$t(`auth.login.signInOrSignUp`)),1)]),_:1},8,[`loading`,`onClick`])]))])]),_:1})}}})})),J;t((()=>{q(),q(),J=K}))();export{J as default};
//# sourceMappingURL=UserPanel-DgGKqeYL.js.map