import{_ as b}from"./AbstraButton.vue_vue_type_script_setup_true_lang.9c0844e1.js";import{A as D}from"./constants.b5d83622.js";import{d as C,ec as N,j as L,u as e,o as n,a as r,S as R,ac as k,f as a,b as t,g as o,t as s,i as d,e as f,df as $,bW as z,bE as F,aY as S,ej as w,bD as G,eu as T,bY as y,cS as V,en as j,f6 as E,h as v,_ as M}from"./jwt-decode.esm.32f71954.js";import{a as P}from"./asyncComputed.f9fa4c71.js";import{G as O,F as U,a as Y}from"./PhTranslate.vue.d4756feb.js";import{F as q}from"./PhSignOut.vue.4f6997f5.js";import{l as A,o as H}from"./router.29e08ea4.js";import{A as W}from"./index.c59ca45b.js";import{A as J}from"./index.5ecb9a37.js";import{u as K}from"./omniChatStore.10d769d2.js";import{G as Q}from"./PhSparkle.vue.e6119d8d.js";import{A as X}from"./index.ab7dc629.js";import{B as Z,A as ee}from"./Breadcrumb.ae24888f.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new Error().stack;i&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[i]="9f7a22cf-0881-463b-997f-e757fe745e18",l._sentryDebugIdIdentifier="sentry-dbid-9f7a22cf-0881-463b-997f-e757fe745e18")}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(l){function i(p){const h=p.split("@")[0];return j.exports.kebabCase(h).toUpperCase().split("-").slice(0,2).map(g=>g[0]).join("")}const c=N(),{result:u,loading:_,refetch:m}=P(async()=>A.getAuthor());async function B(){await A.logout(),H.shutdown(),m(),c.push({name:"login"})}function I(p){localStorage.setItem("locale",String(p.key)),window.location.reload()}return(p,h)=>{const g=L("RouterLink");return e(_)?(n(),r(e(R),{key:0})):e(u)?(n(),k("div",te,[a(b,{class:"intercom-launcher",target:"_blank",type:"link",size:"small"},{default:t(()=>[a(e(O)),o(" "+s(e(d).translate("i18n_loginblock_support")),1)]),_:1}),a(e(V),{placement:"bottomRight"},{content:t(()=>[f("div",ae,[a(e($),{size:"small",type:"secondary"},{default:t(()=>[o(s(e(u).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(T),x=>(n(),r(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(()=>[f("div",oe,[a(e(U),{size:"20"}),o(" "+s(e(d).translate("i18n_loginblock_language")),1)])]),_:1})]),_:1}),a(e(y),{type:"text",onClick:B},{default:t(()=>[f("div",se,[a(e(q),{size:"20"}),o(" "+s(e(d).translate("i18n_loginblock_logout")),1)])]),_:1})])]),default:t(()=>[a(e(W),{align:"center",style:{cursor:"pointer"}},{default:t(()=>[a(e(J),{shape:"square"},{default:t(()=>[o(s(i(e(u).claims.email)),1)]),_:1})]),_:1})]),_:1})])):(n(),r(e(y),{key:2},{default:t(()=>[a(g,{to:"/login"},{default:t(()=>[o(s(e(d).translate("i18n_loginblock_login")),1)]),_:1})]),_:1}))}}}),re={class:"extra"},le=C({__name:"Navbar",props:{breadcrumb:{},showAiSparkles:{type:Boolean}},setup(l){const i=K();return(c,u)=>(n(),r(e(X),{style:{padding:"5px 25px",border:"1px solid #f0f0f0"}},{subTitle:t(()=>[c.breadcrumb?(n(),r(e(Z),{key:0},{default:t(()=>[(n(!0),k(S,null,w(c.breadcrumb,(_,m)=>(n(),r(e(ee),{key:m},{default:t(()=>[a(e(E),{to:_.path},{default:t(()=>[o(s(_.label),1)]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1})):v("",!0)]),extra:t(()=>[f("div",re,[c.showAiSparkles?(n(),r(b,{key:0,type:"link",onClick:u[0]||(u[0]=_=>e(i).toggle())},{default:t(()=>[a(e(Q)),o(" "+s(e(d).translate("i18n_consolenavbar_ai_assistant")),1)]),_:1})):v("",!0),a(b,{href:e(D).DOCS,target:"_blank",type:"link"},{default:t(()=>[a(e(Y)),o(" "+s(e(d).translate("i18n_consolenavbar_docs")),1)]),_:1},8,["href"]),a(ne)])]),_:1}))}});const xe=M(le,[["__scopeId","data-v-a3489e41"]]);export{xe as N};
//# sourceMappingURL=Navbar.299ef0ee.js.map
