import{i as e,n as t}from"./rolldown-runtime-BKYq3fBv.js";import{$n as n,C as r,Cr as i,Gt as a,Kt as o,Nn as s,Or as c,Qn as l,Rr as u,Ut as d,Wt as f,Zn as p,ai as m,ar as h,er as g,ir as _,si as v,sr as y,ui as b,w as x,zr as S}from"./vendor-primevue-D50rA9nL.js";import{n as C,t as w}from"./Button-DzMg17Os.js";import{bo as T,n as E,t as D,xo as O}from"./dialogService-Cr3DyAja.js";import{n as k,t as A}from"./UserAvatar-BviPpgVy.js";var j,M,N,P,F,I,L,R,z,B,V,H,U,W,G,K,q=t((()=>{s(),d(),a(),r(),k(),C(),T(),D(),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=y({__name:`UserPanel`,setup(e){let t=E(),{loading:r,isLoggedIn:a,isApiKeyLogin:s,isEmailProvider:d,userDisplayName:y,userEmail:C,userPhotoUrl:T,providerName:D,providerIcon:k,handleSignOut:K,handleSignIn:q,handleDeleteAccount:J}=O();return(e,E)=>{let O=c(`tooltip`);return i(),l(m(x),{value:`User`,class:`user-settings-container h-full`},{default:u(()=>[p(`div`,j,[p(`h2`,M,b(e.$t(`userSettings.title`)),1),h(m(f),{class:`mb-3`}),m(a)?(i(),g(`div`,N,[m(T)?(i(),l(A,{key:0,"photo-url":m(T),shape:`circle`,size:`large`},null,8,[`photo-url`])):n(``,!0),p(`div`,P,[p(`h3`,F,b(e.$t(`userSettings.name`)),1),p(`div`,I,b(m(y)||e.$t(`userSettings.notSet`)),1)]),p(`div`,L,[p(`h3`,R,b(e.$t(`userSettings.email`)),1),p(`span`,z,b(m(C)),1)]),p(`div`,B,[p(`h3`,V,b(e.$t(`userSettings.provider`)),1),p(`div`,H,[p(`i`,{class:v(m(k))},null,2),_(` `+b(m(D))+` `,1),m(d)?S((i(),l(w,{key:0,variant:`muted-textonly`,size:`icon-sm`,onClick:E[0]||=e=>m(t).showUpdatePasswordDialog()},{default:u(()=>E[1]||=[p(`i`,{class:`pi pi-pen-to-square`},null,-1)]),_:1})),[[O,{value:e.$t(`userSettings.updatePassword`),showDelay:300}]]):n(``,!0)])]),m(r)?(i(),l(m(o),{key:1,class:`mt-4 h-8 w-8`,style:{"--pc-spinner-color":`#000`}})):(i(),g(`div`,U,[h(w,{class:`w-32`,variant:`secondary`,onClick:m(K)},{default:u(()=>[E[2]||=p(`i`,{class:`pi pi-sign-out`},null,-1),_(` `+b(e.$t(`auth.signOut.signOut`)),1)]),_:1},8,[`onClick`]),m(s)?n(``,!0):(i(),l(w,{key:0,class:`w-fit`,variant:`destructive-textonly`,onClick:m(J)},{default:u(()=>[_(b(e.$t(`auth.deleteAccount.deleteAccount`)),1)]),_:1},8,[`onClick`]))]))])):(i(),g(`div`,W,[p(`p`,G,b(e.$t(`auth.login.title`)),1),h(w,{class:`w-52`,variant:`primary`,loading:m(r),onClick:m(q)},{default:u(()=>[E[3]||=p(`i`,{class:`pi pi-user`},null,-1),_(` `+b(e.$t(`auth.login.signInOrSignUp`)),1)]),_:1},8,[`loading`,`onClick`])]))])]),_:1})}}})})),J;t((()=>{q(),q(),J=K}))();export{J as default};
//# sourceMappingURL=UserPanel-xf0JF3bT.js.map