import{defineComponent as w,resolveDirective as b,openBlock as i,createBlock as s,unref as t,withCtx as D,createElementVNode as o,toDisplayString as r,createVNode as p,createElementBlock as m,createCommentVNode as n,normalizeClass as P,createTextVNode as N,withDirectives as U}from"vue";import l from"primevue/button";import E from"primevue/divider";import A from"primevue/progressspinner";import B from"primevue/tabpanel";import{_ as I}from"./UserAvatar.vue_vue_type_script_setup_true_lang-Buu-YWwg.js";import{w as O,E as V}from"./index-1hU-CrHv.js";import"primevue/avatar";import"@primevue/themes";import"@primevue/themes/aura";import"./vendor-other-CxTHhkh8.js";import"./vendor-vue-CazFs7AC.js";import"primevue/config";import"primevue/confirmationservice";import"primevue/toastservice";import"primevue/tooltip";import"vue-i18n";import"primevue/checkbox";import"primevue/message";import"primevue/scrollpanel";import"primevue/usetoast";import"primevue/card";import"primevue/listbox";import"primevue/skeleton";import"primevue/multiselect";import"primevue/inputtext";import"primevue/select";import"./vendor-xterm-DV1MVhAx.js";import"primevue/galleria";import"primevue/popover";import"primevue/iconfield";import"primevue/inputicon";import"primevue/badge";import"primevue/chip";import"primevue/contextmenu";import"primevue/tree";import"primevue/toolbar";import"primevue/progressbar";import"primevue";import"primevue/slider";import"./vendor-three-B-uslVEb.js";import"primevue/floatlabel";import"@primevue/forms";import"@primevue/forms/resolvers/zod";import"primevue/password";import"primevue/tag";import"primevue/inputnumber";import"primevue/tabpanels";import"primevue/tabs";import"primevue/toggleswitch";import"primevue/colorpicker";import"primevue/radiobutton";import"primevue/knob";import"primevue/panel";import"primevue/tabmenu";import"primevue/tab";import"primevue/tablist";import"primevue/autocomplete";import"primevue/dropdown";import"primevue/selectbutton";import"primevue/dialog";import"primevue/confirmpopup";import"primevue/useconfirm";import"primevue/confirmdialog";import"primevue/tieredmenu";import"primevue/chart";import"primevue/imagecompare";import"primevue/textarea";import"primevue/treeselect";import"./vendor-tiptap-fKn4WMvi.js";import"primevue/blockui";const z={class:"flex h-full flex-col"},L={class:"mb-2 text-2xl font-bold"},T={key:0,class:"flex flex-col gap-2"},q={class:"flex flex-col gap-0.5"},K={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"},vo=w({__name:"UserPanel",setup(Y){const u=O(),{loading:a,isLoggedIn:g,isApiKeyLogin:h,isEmailProvider:f,userDisplayName:_,userEmail:v,userPhotoUrl:c,providerName:y,providerIcon:k,handleSignOut:x,handleSignIn:S,handleDeleteAccount:C}=V();return(e,d)=>{const $=b("tooltip");return i(),s(t(B),{value:"User",class:"user-settings-container h-full"},{default:D(()=>[o("div",z,[o("h2",L,r(e.$t("userSettings.title")),1),p(t(E),{class:"mb-3"}),t(g)?(i(),m("div",T,[t(c)?(i(),s(I,{key:0,"photo-url":t(c),shape:"circle",size:"large"},null,8,["photo-url"])):n("",!0),o("div",q,[o("h3",K,r(e.$t("userSettings.name")),1),o("div",j,r(t(_)||e.$t("userSettings.notSet")),1)]),o("div",F,[o("h3",G,r(e.$t("userSettings.email")),1),o("span",H,r(t(v)),1)]),o("div",J,[o("h3",M,r(e.$t("userSettings.provider")),1),o("div",Q,[o("i",{class:P(t(k))},null,2),N(" "+r(t(y))+" ",1),t(f)?U((i(),s(t(l),{key:0,icon:"pi pi-pen-to-square",severity:"secondary",text:"",onClick:d[0]||(d[0]=Z=>t(u).showUpdatePasswordDialog())},null,512)),[[$,{value:e.$t("userSettings.updatePassword"),showDelay:300}]]):n("",!0)])]),t(a)?(i(),s(t(A),{key:1,class:"mt-4 h-8 w-8",style:{"--pc-spinner-color":"#000"}})):(i(),m("div",R,[p(t(l),{class:"w-32",severity:"secondary",label:e.$t("auth.signOut.signOut"),icon:"pi pi-sign-out",onClick:t(x)},null,8,["label","onClick"]),t(h)?n("",!0):(i(),s(t(l),{key:0,class:"w-fit",variant:"text",severity:"danger",label:e.$t("auth.deleteAccount.deleteAccount"),onClick:t(C)},null,8,["label","onClick"]))]))])):(i(),m("div",W,[o("p",X,r(e.$t("auth.login.title")),1),p(t(l),{class:"w-52",severity:"primary",loading:t(a),label:e.$t("auth.login.signInOrSignUp"),icon:"pi pi-user",onClick:t(S)},null,8,["loading","label","onClick"])]))])]),_:1})}}});export{vo as default};
//# sourceMappingURL=UserPanel-B_Xz16u7.js.map
