import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import{$ as t,B as n}from"./vendor-primevue-DOcVZxnt.js";import"./vendor-firebase-yTFzdAQf.js";import{A as r,F as i,I as a,It as o,O as s,R as c,Rt as l,Vt as u,_t as d,at as f,et as p,gt as m,it as h,j as g,k as _}from"./vendor-vue-core-CvBSzfTV.js";import"./vendor-other-ZVm7XS8K.js";import"./useFeatureFlags-CMK9o9Rw.js";import"./api-OgmjiUkn.js";import"./colorUtil-C9tyO6rZ.js";import"./i18n-S80A-Sy1.js";import"./vendor-reka-ui-EFkcZtPy.js";import{t as v}from"./Button-C-kbn1lh.js";import{qn as y,t as b}from"./dialogService-Dp405gae.js";import"./systemStatsStore-BAnEcJS2.js";import"./useErrorHandling-DfKSzlg9.js";import"./dialogStore-BDXSs8Ic.js";import"./userStore-C5cqCkur.js";import"./useCopyToClipboard-_eFTtqIy.js";import"./vendor-tiptap-BZCaYoPl.js";import"./vendor-markdown-Gcn_JH9N.js";import"./markdownRendererUtil-BD0lrBqH.js";import"./useExternalLink-CZSEXO8Q.js";import{t as x}from"./UserAvatar-CNcM0jQW.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=c({__name:`UserPanel`,setup(e){let c=b(),{loading:R,isLoggedIn:z,isApiKeyLogin:B,isEmailProvider:V,userDisplayName:H,userEmail:U,userPhotoUrl:W,providerName:G,providerIcon:K,handleSignOut:q,handleSignIn:J}=y();return(e,y)=>{let b=h(`i18n-t`),Y=f(`tooltip`);return p(),g(`div`,S,[s(`div`,C,[s(`h2`,w,u(e.$t(`userSettings.title`)),1),a(o(t),{class:`mb-3`}),o(z)?(p(),g(`div`,T,[o(W)?(p(),_(x,{key:0,"photo-url":o(W),shape:`circle`,size:`large`},null,8,[`photo-url`])):r(``,!0),s(`div`,E,[s(`h3`,D,u(e.$t(`userSettings.name`)),1),s(`div`,O,u(o(H)||e.$t(`userSettings.notSet`)),1)]),s(`div`,k,[s(`h3`,A,u(e.$t(`userSettings.email`)),1),s(`span`,j,u(o(U)),1)]),s(`div`,M,[s(`h3`,N,u(e.$t(`userSettings.provider`)),1),s(`div`,P,[s(`i`,{class:l(o(K))},null,2),i(` `+u(o(G))+` `,1),o(V)?d((p(),_(v,{key:0,variant:`muted-textonly`,size:`icon-sm`,onClick:y[0]||=e=>o(c).showUpdatePasswordDialog()},{default:m(()=>y[1]||=[s(`i`,{class:`pi pi-pen-to-square`},null,-1)]),_:1})),[[Y,{value:e.$t(`userSettings.updatePassword`),showDelay:300}]]):r(``,!0)])]),o(R)?(p(),_(o(n),{key:1,class:`mt-4 h-8 w-8`,style:{"--pc-spinner-color":`#000`}})):(p(),g(`div`,F,[a(v,{class:`w-32`,variant:`secondary`,onClick:o(q)},{default:m(()=>[y[2]||=s(`i`,{class:`pi pi-sign-out`},null,-1),i(` `+u(e.$t(`auth.signOut.signOut`)),1)]),_:1},8,[`onClick`]),o(B)?r(``,!0):(p(),_(b,{key:0,keypath:`auth.deleteAccount.contactSupport`,tag:`p`,class:`text-muted text-sm`},{email:m(()=>y[3]||=[s(`a`,{href:`mailto:support@comfy.org`,class:`underline`},`support@comfy.org`,-1)]),_:1}))]))])):(p(),g(`div`,I,[s(`p`,L,u(e.$t(`auth.login.title`)),1),a(v,{class:`w-52`,variant:`primary`,loading:o(R),onClick:o(J)},{default:m(()=>[y[4]||=s(`i`,{class:`pi pi-user`},null,-1),i(` `+u(e.$t(`auth.login.signInOrSignUp`)),1)]),_:1},8,[`loading`,`onClick`])]))])])}}});export{R as default};
//# sourceMappingURL=UserPanel-zLAplzPC.js.map