import{r as b,s as a,h as w,I as D}from"./vendor-primevue-RJTR6wkG.js";import{_ as N}from"./UserAvatar.vue_vue_type_script_setup_true_lang-D6k2s9ze.js";import{q as U,a2 as A}from"./index-xLwXl4ov.js";import{bq as I,k as P,p as i,d as l,q,e as s,A as n,c as r,t as o,br as e,s as c,h as B,l as O,u as V}from"./vendor-other-yzRpIrj2.js";import"./vendor-vue-ByIfjd1d.js";import"./vendor-xterm-CWYFmgbN.js";import"./vendor-three-b7sMVVQK.js";import"./vendor-tiptap-DcddbIvp.js";const E={class:"flex h-full flex-col"},z={class:"mb-2 text-2xl font-bold"},L={key:0,class:"flex flex-col gap-2"},K={class:"flex flex-col gap-0.5"},T={class:"font-medium"},j={class:"text-muted"},F={class:"flex flex-col gap-0.5"},G={class:"font-medium"},H={class:"text-muted"},J={class:"flex flex-col gap-0.5"},M={class:"font-medium"},Q={class:"flex items-center gap-1 text-muted"},R={key:2,class:"mt-4 flex flex-col gap-2"},W={key:1,class:"flex flex-col gap-4"},X={class:"text-smoke-600"},re=I({__name:"UserPanel",setup(Y){const m=U(),{loading:d,isLoggedIn:h,isApiKeyLogin:g,isEmailProvider:f,userDisplayName:_,userEmail:v,userPhotoUrl:u,providerName:k,providerIcon:y,handleSignOut:x,handleSignIn:$,handleDeleteAccount:S}=A();return(t,p)=>{const C=P("tooltip");return l(),i(e(D),{value:"User",class:"user-settings-container h-full"},{default:q(()=>[s("div",E,[s("h2",z,o(t.$t("userSettings.title")),1),n(e(b),{class:"mb-3"}),e(h)?(l(),r("div",L,[e(u)?(l(),i(N,{key:0,"photo-url":e(u),shape:"circle",size:"large"},null,8,["photo-url"])):c("",!0),s("div",K,[s("h3",T,o(t.$t("userSettings.name")),1),s("div",j,o(e(_)||t.$t("userSettings.notSet")),1)]),s("div",F,[s("h3",G,o(t.$t("userSettings.email")),1),s("span",H,o(e(v)),1)]),s("div",J,[s("h3",M,o(t.$t("userSettings.provider")),1),s("div",Q,[s("i",{class:V(e(y))},null,2),B(" "+o(e(k))+" ",1),e(f)?O((l(),i(e(a),{key:0,icon:"pi pi-pen-to-square",severity:"secondary",text:"",onClick:p[0]||(p[0]=Z=>e(m).showUpdatePasswordDialog())},null,512)),[[C,{value:t.$t("userSettings.updatePassword"),showDelay:300}]]):c("",!0)])]),e(d)?(l(),i(e(w),{key:1,class:"mt-4 h-8 w-8",style:{"--pc-spinner-color":"#000"}})):(l(),r("div",R,[n(e(a),{class:"w-32",severity:"secondary",label:t.$t("auth.signOut.signOut"),icon:"pi pi-sign-out",onClick:e(x)},null,8,["label","onClick"]),e(g)?c("",!0):(l(),i(e(a),{key:0,class:"w-fit",variant:"text",severity:"danger",label:t.$t("auth.deleteAccount.deleteAccount"),onClick:e(S)},null,8,["label","onClick"]))]))])):(l(),r("div",W,[s("p",X,o(t.$t("auth.login.title")),1),n(e(a),{class:"w-52",severity:"primary",loading:e(d),label:t.$t("auth.login.signInOrSignUp"),icon:"pi pi-user",onClick:e($)},null,8,["loading","label","onClick"])]))])]),_:1})}}});export{re as default};
//# sourceMappingURL=UserPanel-BYQKTNpT.js.map
