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