import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import{W as t,Z as n}from"./vendor-primevue-DGevbYGF.js";import"./vendor-firebase-yTFzdAQf.js";import{A as r,Bt as i,F as a,I as o,O as s,R as c,Rt as l,Ut as u,_t as d,at as f,et as p,it as m,j as h,k as g,vt as _}from"./vendor-vue-core-BdhYaYlO.js";import"./vendor-other-D9HJWI2D.js";import"./useFeatureFlags-DLStzqlx.js";import"./api-C1WIrB4Z.js";import"./vendor-markdown-th9BvURy.js";import"./colorUtil-DJbZtU1U.js";import"./i18n-DKtnmyh4.js";import"./vendor-reka-ui-CSo89nDv.js";import{t as v}from"./Button-DHxPjNdi.js";import{Qr as y,t as b}from"./dialogService-CwVeD8j9.js";import"./extensionStore-By6c6sCD.js";import"./userStore-ChcnLOkA.js";import"./useErrorHandling-CWU_3R6Y.js";import"./useExternalLink-DZBh_BZs.js";import"./vendor-tiptap-BZHcjrm1.js";import"./markdownRendererUtil-J4WlXR5e.js";import"./Popover-_oREh-V5.js";import{t as x}from"./UserAvatar-CWMTZklL.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=m(`i18n-t`),Y=f(`tooltip`);return p(),h(`div`,S,[s(`div`,C,[s(`h2`,w,u(e.$t(`userSettings.title`)),1),o(l(t),{class:`mb-3`}),l(z)?(p(),h(`div`,T,[l(W)?(p(),g(x,{key:0,"photo-url":l(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(l(H)||e.$t(`userSettings.notSet`)),1)]),s(`div`,k,[s(`h3`,A,u(e.$t(`userSettings.email`)),1),s(`span`,j,u(l(U)),1)]),s(`div`,M,[s(`h3`,N,u(e.$t(`userSettings.provider`)),1),s(`div`,P,[s(`i`,{class:i(l(K))},null,2),a(` `+u(l(G))+` `,1),l(V)?_((p(),g(v,{key:0,variant:`muted-textonly`,size:`icon-sm`,onClick:y[0]||=e=>l(c).showUpdatePasswordDialog()},{default:d(()=>y[1]||=[s(`i`,{class:`pi pi-pen-to-square`},null,-1)]),_:1})),[[Y,{value:e.$t(`userSettings.updatePassword`),showDelay:300}]]):r(``,!0)])]),l(R)?(p(),g(l(n),{key:1,class:`mt-4 h-8 w-8`,style:{"--pc-spinner-color":`#000`}})):(p(),h(`div`,F,[o(v,{class:`w-32`,variant:`secondary`,onClick:l(q)},{default:d(()=>[y[2]||=s(`i`,{class:`pi pi-sign-out`},null,-1),a(` `+u(e.$t(`auth.signOut.signOut`)),1)]),_:1},8,[`onClick`]),l(B)?r(``,!0):(p(),g(b,{key:0,keypath:`auth.deleteAccount.contactSupport`,tag:`p`,class:`text-muted text-sm`},{email:d(()=>y[3]||=[s(`a`,{href:`mailto:support@comfy.org`,class:`underline`},`support@comfy.org`,-1)]),_:1}))]))])):(p(),h(`div`,I,[s(`p`,L,u(e.$t(`auth.login.title`)),1),o(v,{class:`w-52`,variant:`primary`,loading:l(R),onClick:l(J)},{default:d(()=>[y[4]||=s(`i`,{class:`pi pi-user`},null,-1),a(` `+u(e.$t(`auth.login.signInOrSignUp`)),1)]),_:1},8,[`loading`,`onClick`])]))])])}}});export{R as default};
//# sourceMappingURL=UserPanel-D3gkjBtC.js.map