import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{X as t,Y as n,f as r}from"./vendor-primevue-DxVRNMbC.js";import"./vendor-firebase-CdLSXhbt.js";import{A as i,F as a,I as o,It as s,O as c,R as l,Rt as u,Vt as d,_t as f,at as p,et as m,gt as h,it as g,j as _,k as v}from"./vendor-vue-core-X6q-rGJs.js";import"./vendor-other-CyG3qq8S.js";import"./useFeatureFlags-CxRWjdi1.js";import"./api-DQLKc1Xa.js";import"./vendor-markdown-Cola12Wc.js";import"./colorUtil-Cth7eqhK.js";import"./i18n-DjV_9lZM.js";import"./vendor-reka-ui-CHPbCe4i.js";import{t as y}from"./Button-C7dWyQyS.js";import{rr as b,t as x}from"./dialogService-Cqui0UMO.js";import"./systemStatsStore-D9aNY5gT.js";import"./useErrorHandling-BFB8eSj5.js";import"./dialogStore-CXD5Bcfy.js";import"./useCopyToClipboard-C74olorb.js";import"./vendor-tiptap-BXSIIPYY.js";import"./markdownRendererUtil-Bm7Umh6C.js";import"./useExternalLink-Cc30SNi3.js";import{t as S}from"./UserAvatar-B_ZX16Wt.js";var 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=x(),{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,b)=>{let x=g(`i18n-t`),Y=p(`tooltip`);return m(),v(s(r),{value:`User`,class:`user-settings-container h-full`},{default:h(()=>[c(`div`,C,[c(`h2`,w,d(e.$t(`userSettings.title`)),1),o(s(t),{class:`mb-3`}),s(z)?(m(),_(`div`,T,[s(W)?(m(),v(S,{key:0,"photo-url":s(W),shape:`circle`,size:`large`},null,8,[`photo-url`])):i(``,!0),c(`div`,E,[c(`h3`,D,d(e.$t(`userSettings.name`)),1),c(`div`,O,d(s(H)||e.$t(`userSettings.notSet`)),1)]),c(`div`,k,[c(`h3`,A,d(e.$t(`userSettings.email`)),1),c(`span`,j,d(s(U)),1)]),c(`div`,M,[c(`h3`,N,d(e.$t(`userSettings.provider`)),1),c(`div`,P,[c(`i`,{class:u(s(K))},null,2),a(` `+d(s(G))+` `,1),s(V)?f((m(),v(y,{key:0,variant:`muted-textonly`,size:`icon-sm`,onClick:b[0]||=e=>s(l).showUpdatePasswordDialog()},{default:h(()=>b[1]||=[c(`i`,{class:`pi pi-pen-to-square`},null,-1)]),_:1})),[[Y,{value:e.$t(`userSettings.updatePassword`),showDelay:300}]]):i(``,!0)])]),s(R)?(m(),v(s(n),{key:1,class:`mt-4 h-8 w-8`,style:{"--pc-spinner-color":`#000`}})):(m(),_(`div`,F,[o(y,{class:`w-32`,variant:`secondary`,onClick:s(q)},{default:h(()=>[b[2]||=c(`i`,{class:`pi pi-sign-out`},null,-1),a(` `+d(e.$t(`auth.signOut.signOut`)),1)]),_:1},8,[`onClick`]),s(B)?i(``,!0):(m(),v(x,{key:0,keypath:`auth.deleteAccount.contactSupport`,tag:`p`,class:`text-muted text-sm`},{email:h(()=>b[3]||=[c(`a`,{href:`mailto:support@comfy.org`,class:`underline`},`support@comfy.org`,-1)]),_:1}))]))])):(m(),_(`div`,I,[c(`p`,L,d(e.$t(`auth.login.title`)),1),o(y,{class:`w-52`,variant:`primary`,loading:s(R),onClick:s(J)},{default:h(()=>[b[4]||=c(`i`,{class:`pi pi-user`},null,-1),a(` `+d(e.$t(`auth.login.signInOrSignUp`)),1)]),_:1},8,[`loading`,`onClick`])]))])]),_:1})}}});export{R as default};
//# sourceMappingURL=UserPanel-BiklV_5p.js.map