import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import{K as t,w as n}from"./vendor-primevue-DyvCA8Nd.js";import"./vendor-firebase-yTFzdAQf.js";import{A as r,F as i,Ht as a,I as o,Lt as s,O as c,R as l,_t as u,at as d,et as f,it as p,j as m,k as h,vt as g,zt as _}from"./vendor-vue-core-IZuWV8u3.js";import"./vendor-other-Q0G0D0d6.js";import"./useFeatureFlags-BfqxvwHy.js";import"./api-C840HmAF.js";import"./vendor-markdown-8POvMhty.js";import"./colorUtil-Q3kaA72Z.js";import"./i18n-B8CRKNXU.js";import"./vendor-reka-ui-Dfvl2gA8.js";import{t as v}from"./Button-uSZXZovG.js";import{t as y,xr as b}from"./dialogService-J-k0CeI4.js";import"./systemStatsStore-BJOd4X3d.js";import"./userStore-o2bxxBJt.js";import"./useErrorHandling-t4kNWELW.js";import"./vendor-tiptap-BZCaYoPl.js";import"./Popover-BV6_S20i.js";import"./markdownRendererUtil-DH1PCfUd.js";import"./useExternalLink-Cxwyf6Kb.js";import{t as x}from"./UserAvatar-DcG3f8Tx.js";var S={class:`user-settings-container h-full`},C={class:`flex h-full flex-col`},w={class:`mb-2 text-2xl font-bold`},T={key:0,class:`flex flex-col gap-2`},E={class:`flex flex-col gap-0.5`},D={class:`font-medium`},O={class:`text-muted`},k={class:`flex flex-col gap-0.5`},A={class:`font-medium`},j={class:`text-muted`},M={class:`flex flex-col gap-0.5`},N={class:`font-medium`},P={class:`flex items-center gap-1 text-muted`},F={key:2,class:`mt-4 flex flex-col gap-2`},I={key:1,class:`flex flex-col gap-4`},L={class:`text-smoke-600`},R=l({__name:`UserPanel`,setup(e){let l=y(),{loading:R,isLoggedIn:z,isApiKeyLogin:B,isEmailProvider:V,userDisplayName:H,userEmail:U,userPhotoUrl:W,providerName:G,providerIcon:K,handleSignOut:q,handleSignIn:J}=b();return(e,y)=>{let b=p(`i18n-t`),Y=d(`tooltip`);return f(),m(`div`,S,[c(`div`,C,[c(`h2`,w,a(e.$t(`userSettings.title`)),1),o(s(t),{class:`mb-3`}),s(z)?(f(),m(`div`,T,[s(W)?(f(),h(x,{key:0,"photo-url":s(W),shape:`circle`,size:`large`},null,8,[`photo-url`])):r(``,!0),c(`div`,E,[c(`h3`,D,a(e.$t(`userSettings.name`)),1),c(`div`,O,a(s(H)||e.$t(`userSettings.notSet`)),1)]),c(`div`,k,[c(`h3`,A,a(e.$t(`userSettings.email`)),1),c(`span`,j,a(s(U)),1)]),c(`div`,M,[c(`h3`,N,a(e.$t(`userSettings.provider`)),1),c(`div`,P,[c(`i`,{class:_(s(K))},null,2),i(` `+a(s(G))+` `,1),s(V)?g((f(),h(v,{key:0,variant:`muted-textonly`,size:`icon-sm`,onClick:y[0]||=e=>s(l).showUpdatePasswordDialog()},{default:u(()=>y[1]||=[c(`i`,{class:`pi pi-pen-to-square`},null,-1)]),_:1})),[[Y,{value:e.$t(`userSettings.updatePassword`),showDelay:300}]]):r(``,!0)])]),s(R)?(f(),h(s(n),{key:1,class:`mt-4 h-8 w-8`,style:{"--pc-spinner-color":`#000`}})):(f(),m(`div`,F,[o(v,{class:`w-32`,variant:`secondary`,onClick:s(q)},{default:u(()=>[y[2]||=c(`i`,{class:`pi pi-sign-out`},null,-1),i(` `+a(e.$t(`auth.signOut.signOut`)),1)]),_:1},8,[`onClick`]),s(B)?r(``,!0):(f(),h(b,{key:0,keypath:`auth.deleteAccount.contactSupport`,tag:`p`,class:`text-muted text-sm`},{email:u(()=>y[3]||=[c(`a`,{href:`mailto:support@comfy.org`,class:`underline`},`support@comfy.org`,-1)]),_:1}))]))])):(f(),m(`div`,I,[c(`p`,L,a(e.$t(`auth.login.title`)),1),o(v,{class:`w-52`,variant:`primary`,loading:s(R),onClick:s(J)},{default:u(()=>[y[4]||=c(`i`,{class:`pi pi-user`},null,-1),i(` `+a(e.$t(`auth.login.signInOrSignUp`)),1)]),_:1},8,[`loading`,`onClick`])]))])])}}});export{R as default};
//# sourceMappingURL=UserPanel-BrJ1gyiS.js.map