import"./rolldown-runtime-DIIn1E2Q.js";import{Q as e,W as t}from"./vendor-primevue-_eYbXsHY.js";import"./vendor-firebase-D7u00oy9.js";import{A as n,Bt as r,F as i,I as a,O as o,R as s,Rt as c,Ut as l,_t as u,at as d,et as f,it as p,j as m,k as h,vt as g}from"./vendor-vue-core-DO0afONr.js";import"./vendor-other-D7fTIduy.js";import"./useFeatureFlags-ChmiVSwD.js";import"./api-BebQfoGK.js";import"./vendor-markdown-Da9QPS2x.js";import"./colorUtil-xHrUTSza.js";import"./i18n-dAUEhQVe.js";import"./vendor-reka-ui-D1HCh14_.js";import{t as _}from"./Button-hTbieW3T.js";import{Ti as v,t as y}from"./dialogService-Cm1GEBK8.js";import"./formatUtil-Gr6H7233.js";import"./userStore-DMlTsx5E.js";import"./useErrorHandling-DudkVSep.js";import"./extensionStore-P-YqST__.js";import"./useExternalLink-DY6FqhTr.js";import"./vendor-tiptap-CcjHVRxb.js";import"./markdownRendererUtil-PltcX2Bi.js";import"./Popover-BhkpNQxC.js";import"./electronDownloadStore-BYrGQ7mS.js";import{t as b}from"./UserAvatar-Dm1rTHqa.js";var x={class:`user-settings-container h-full`},S={class:`flex h-full flex-col`},C={class:`mb-2 text-2xl font-bold`},w={key:0,class:`flex flex-col gap-2`},T={class:`flex flex-col gap-0.5`},E={class:`font-medium`},D={class:`text-muted`},O={class:`flex flex-col gap-0.5`},k={class:`font-medium`},A={class:`text-muted`},j={class:`flex flex-col gap-0.5`},M={class:`font-medium`},N={class:`flex items-center gap-1 text-muted`},P={key:2,class:`mt-4 flex flex-col gap-2`},F={key:1,class:`flex flex-col gap-4`},I={class:`text-smoke-600`},L=s({__name:`UserPanel`,setup(s){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}=v();return(s,v)=>{let y=p(`i18n-t`),Y=d(`tooltip`);return f(),m(`div`,x,[o(`div`,S,[o(`h2`,C,l(s.$t(`userSettings.title`)),1),a(c(t),{class:`mb-3`}),c(z)?(f(),m(`div`,w,[c(W)?(f(),h(b,{key:0,"photo-url":c(W),shape:`circle`,size:`large`},null,8,[`photo-url`])):n(``,!0),o(`div`,T,[o(`h3`,E,l(s.$t(`userSettings.name`)),1),o(`div`,D,l(c(H)||s.$t(`userSettings.notSet`)),1)]),o(`div`,O,[o(`h3`,k,l(s.$t(`userSettings.email`)),1),o(`span`,A,l(c(U)),1)]),o(`div`,j,[o(`h3`,M,l(s.$t(`userSettings.provider`)),1),o(`div`,N,[o(`i`,{class:r(c(K))},null,2),i(` `+l(c(G))+` `,1),c(V)?g((f(),h(_,{key:0,variant:`muted-textonly`,size:`icon-sm`,onClick:v[0]||=e=>c(L).showUpdatePasswordDialog()},{default:u(()=>v[1]||=[o(`i`,{class:`pi pi-pen-to-square`},null,-1)]),_:1})),[[Y,{value:s.$t(`userSettings.updatePassword`),showDelay:300}]]):n(``,!0)])]),c(R)?(f(),h(c(e),{key:1,class:`mt-4 size-8`,style:{"--pc-spinner-color":`#000`}})):(f(),m(`div`,P,[a(_,{class:`w-32`,variant:`secondary`,onClick:c(q)},{default:u(()=>[v[2]||=o(`i`,{class:`pi pi-sign-out`},null,-1),i(` `+l(s.$t(`auth.signOut.signOut`)),1)]),_:1},8,[`onClick`]),c(B)?n(``,!0):(f(),h(y,{key:0,keypath:`auth.deleteAccount.contactSupport`,tag:`p`,class:`text-sm text-muted`},{email:u(()=>v[3]||=[o(`a`,{href:`mailto:support@comfy.org`,class:`underline`},`support@comfy.org`,-1)]),_:1}))]))])):(f(),m(`div`,F,[o(`p`,I,l(s.$t(`auth.login.title`)),1),a(_,{class:`w-52`,variant:`primary`,loading:c(R),onClick:c(J)},{default:u(()=>[v[4]||=o(`i`,{class:`pi pi-user`},null,-1),i(` `+l(s.$t(`auth.login.signInOrSignUp`)),1)]),_:1},8,[`loading`,`onClick`])]))])])}}});export{L as default};
//# sourceMappingURL=UserPanel-C7Uk35hz.js.map