import{_ as b}from"./AbstraButton.vue_vue_type_script_setup_true_lang.d8bcc7e4.js";import{A as D}from"./constants.6f371b22.js";import{d as C,ec as N,j as L,u as e,o as n,a as l,S as R,ac as k,f as a,b as t,g as o,t as s,i as c,e as p,df as $,bW as z,bE as F,aY as S,eB as w,bD as G,eM as M,bY as y,cS as T,eH as V,ft as E,h as v,_ as P}from"./jwt-decode.esm.7c9b757c.js";import{a as j}from"./asyncComputed.29ba9357.js";import{G as H,F as O,a as U}from"./PhTranslate.vue.453b71d5.js";import{F as Y}from"./PhSignOut.vue.354e5bf2.js";import{l as A,o as q}from"./router.95e6e4b6.js";import{b as W,B as J,A as K}from"./index.b636bb44.js";import{A as Q}from"./index.3a0bf605.js";import{u as X}from"./omniChatStore.8a94c755.js";import{G as Z}from"./PhSparkle.vue.e25ae481.js";import{A as ee}from"./index.2afdfa89.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new Error().stack;i&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[i]="dd9085d5-7659-4d72-b5f3-ac079fddc7b3",r._sentryDebugIdIdentifier="sentry-dbid-dd9085d5-7659-4d72-b5f3-ac079fddc7b3")}catch{}})();const te={key:1,style:{display:"flex","align-items":"center",gap:"16px"}},ae={style:{display:"flex","flex-direction":"column",gap:"10px"}},oe={style:{display:"flex",gap:"5px"}},se={style:{display:"flex",gap:"5px"}},ne=C({__name:"LoginBlock",setup(r){function i(_){const h=_.split("@")[0];return V.exports.kebabCase(h).toUpperCase().split("-").slice(0,2).map(g=>g[0]).join("")}const f=N(),{result:d,loading:u,refetch:m}=j(async()=>A.getAuthor());async function B(){await A.logout(),q.shutdown(),m(),f.push({name:"login"})}function I(_){localStorage.setItem("locale",String(_.key)),window.location.reload()}return(_,h)=>{const g=L("RouterLink");return e(u)?(n(),l(e(R),{key:0})):e(d)?(n(),k("div",te,[a(b,{class:"intercom-launcher",target:"_blank",type:"link",size:"small"},{default:t(()=>[a(e(H)),o(" "+s(e(c).translate("i18n_loginblock_support")),1)]),_:1}),a(e(T),{placement:"bottomRight"},{content:t(()=>[p("div",ae,[a(e($),{size:"small",type:"secondary"},{default:t(()=>[o(s(e(d).claims.email),1)]),_:1}),a(e(z),{trigger:["click"]},{overlay:t(()=>[a(e(F),{onClick:I},{default:t(()=>[(n(!0),k(S,null,w(e(M),x=>(n(),l(e(G),{key:x.key},{default:t(()=>[o(s(x.value),1)]),_:2},1024))),128))]),_:1})]),default:t(()=>[a(e(y),{type:"text"},{default:t(()=>[p("div",oe,[a(e(O),{size:"20"}),o(" "+s(e(c).translate("i18n_loginblock_language")),1)])]),_:1})]),_:1}),a(e(y),{type:"text",onClick:B},{default:t(()=>[p("div",se,[a(e(Y),{size:"20"}),o(" "+s(e(c).translate("i18n_loginblock_logout")),1)])]),_:1})])]),default:t(()=>[a(e(W),{align:"center",style:{cursor:"pointer"}},{default:t(()=>[a(e(Q),{shape:"square"},{default:t(()=>[o(s(i(e(d).claims.email)),1)]),_:1})]),_:1})]),_:1})])):(n(),l(e(y),{key:2},{default:t(()=>[a(g,{to:"/login"},{default:t(()=>[o(s(e(c).translate("i18n_loginblock_login")),1)]),_:1})]),_:1}))}}}),re={class:"extra"},le=C({__name:"Navbar",props:{breadcrumb:{},showAiSparkles:{type:Boolean}},setup(r){const i=X();return(f,d)=>(n(),l(e(ee),{style:{padding:"5px 25px",border:"1px solid #f0f0f0"}},{subTitle:t(()=>[r.breadcrumb?(n(),l(e(J),{key:0},{default:t(()=>[(n(!0),k(S,null,w(r.breadcrumb,(u,m)=>(n(),l(e(K),{key:m},{default:t(()=>[a(e(E),{to:u.path},{default:t(()=>[o(s(u.label),1)]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1})):v("",!0)]),extra:t(()=>[p("div",re,[r.showAiSparkles?(n(),l(b,{key:0,type:"link",onClick:d[0]||(d[0]=u=>e(i).toggle())},{default:t(()=>[a(e(Z)),o(" "+s(e(c).translate("i18n_consolenavbar_ai_assistant")),1)]),_:1})):v("",!0),a(b,{href:e(D).DOCS,target:"_blank",type:"link"},{default:t(()=>[a(e(U)),o(" "+s(e(c).translate("i18n_consolenavbar_docs")),1)]),_:1},8,["href"]),a(ne)])]),_:1}))}});const he=P(le,[["__scopeId","data-v-a3489e41"]]);export{he as N};
//# sourceMappingURL=Navbar.2c23de9f.js.map
