import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{X as t,Y as n,f as r}from"./vendor-primevue-7po8Zk9v.js";import"./vendor-firebase-CdLSXhbt.js";import{$ as i,A as a,Bt as o,D as s,F as c,Ft as l,L as u,Lt as d,O as f,P as p,gt as m,ht as h,it as g,k as _,rt as v}from"./vendor-vue-core-D3IvUUeM.js";import"./vendor-other-CrvBxfcV.js";import"./types-0oh-UGWL.js";import"./remoteConfig-CNDr9CtS.js";import"./api-3C7_IVZO.js";import"./colorUtil-C83P1Arv.js";import"./i18n-DjEVEIh2.js";import"./useErrorHandling-CBX3YQ5l.js";import"./vendor-reka-ui-Bm3o_ZTf.js";import{t as y}from"./Button-mG8zDgxj.js";import{t as b,yr as x}from"./dialogService-BC0EXJA5.js";import"./systemStatsStore-gvlzOl4W.js";import"./dialogStore-BbHfkjRE.js";import"./useCopyToClipboard-CUuoo5Dm.js";import"./vendor-tiptap-DsZVujQD.js";import"./vendor-markdown-yjaB1jgA.js";import"./markdownRendererUtil-D5cHPoK2.js";import{t as S}from"./UserAvatar-RYLK1cyw.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=u({__name:`UserPanel`,setup(e){let u=b(),{loading:R,isLoggedIn:z,isApiKeyLogin:B,isEmailProvider:V,userDisplayName:H,userEmail:U,userPhotoUrl:W,providerName:G,providerIcon:K,handleSignOut:q,handleSignIn:J}=x();return(e,b)=>{let x=v(`i18n-t`),Y=g(`tooltip`);return i(),f(l(r),{value:`User`,class:`user-settings-container h-full`},{default:h(()=>[s(`div`,C,[s(`h2`,w,o(e.$t(`userSettings.title`)),1),c(l(t),{class:`mb-3`}),l(z)?(i(),a(`div`,T,[l(W)?(i(),f(S,{key:0,"photo-url":l(W),shape:`circle`,size:`large`},null,8,[`photo-url`])):_(``,!0),s(`div`,E,[s(`h3`,D,o(e.$t(`userSettings.name`)),1),s(`div`,O,o(l(H)||e.$t(`userSettings.notSet`)),1)]),s(`div`,k,[s(`h3`,A,o(e.$t(`userSettings.email`)),1),s(`span`,j,o(l(U)),1)]),s(`div`,M,[s(`h3`,N,o(e.$t(`userSettings.provider`)),1),s(`div`,P,[s(`i`,{class:d(l(K))},null,2),p(` `+o(l(G))+` `,1),l(V)?m((i(),f(y,{key:0,variant:`muted-textonly`,size:`icon-sm`,onClick:b[0]||=e=>l(u).showUpdatePasswordDialog()},{default:h(()=>b[1]||=[s(`i`,{class:`pi pi-pen-to-square`},null,-1)]),_:1})),[[Y,{value:e.$t(`userSettings.updatePassword`),showDelay:300}]]):_(``,!0)])]),l(R)?(i(),f(l(n),{key:1,class:`mt-4 h-8 w-8`,style:{"--pc-spinner-color":`#000`}})):(i(),a(`div`,F,[c(y,{class:`w-32`,variant:`secondary`,onClick:l(q)},{default:h(()=>[b[2]||=s(`i`,{class:`pi pi-sign-out`},null,-1),p(` `+o(e.$t(`auth.signOut.signOut`)),1)]),_:1},8,[`onClick`]),l(B)?_(``,!0):(i(),f(x,{key:0,keypath:`auth.deleteAccount.contactSupport`,tag:`p`,class:`text-muted text-sm`},{email:h(()=>b[3]||=[s(`a`,{href:`mailto:support@comfy.org`,class:`underline`},`support@comfy.org`,-1)]),_:1}))]))])):(i(),a(`div`,I,[s(`p`,L,o(e.$t(`auth.login.title`)),1),c(y,{class:`w-52`,variant:`primary`,loading:l(R),onClick:l(J)},{default:h(()=>[b[4]||=s(`i`,{class:`pi pi-user`},null,-1),p(` `+o(e.$t(`auth.login.signInOrSignUp`)),1)]),_:1},8,[`loading`,`onClick`])]))])]),_:1})}}});export{R as default};
//# sourceMappingURL=UserPanel-Pfc3cPI4.js.map