import{_ as y}from"./AbstraButton.vue_vue_type_script_setup_true_lang-C8pP27Qo.js";import{A as N}from"./constants-BEk-t5le.js";import{a as A,ae as D,a4 as L,p as l,b as k,u as e,e as n,b7 as R,j as t,w as a,S as o,U as s,af as d,bd as $,h as f,ak as z,be as F,B as b,bf as G,M as C,W as S,bg as M,bh as T,a9 as V,g as v,bi as E,aN as P}from"./jwt-decode.esm-DyyavT6h.js";import{a as U}from"./asyncComputed-D5HqUDwR.js";import{G as j,F as O,a as q}from"./PhTranslate.vue-AmAtOtBe.js";import{F as H}from"./PhSignOut.vue-hw-7sNAH.js";import{b as w,a as W}from"./router-BhKBgDIv.js";import{S as J,B as K,A as Q}from"./index-DdqJ9EQR.js";import{A as X}from"./index-CHZRANF0.js";import{u as Y}from"./omniChatStore-n1MkGLEa.js";import{G as Z}from"./PhSparkle.vue-M1I_bE0u.js";import{A as ee}from"./index-CREYrgWF.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]="a8f8f3e6-c168-484a-a2fd-edceb5d71830",r._sentryDebugIdIdentifier="sentry-dbid-a8f8f3e6-c168-484a-a2fd-edceb5d71830")}catch{}})();const ae={key:1,style:{display:"flex","align-items":"center",gap:"16px"}},te={style:{display:"flex","flex-direction":"column",gap:"10px"}},oe={style:{display:"flex",gap:"5px"}},se={style:{display:"flex",gap:"5px"}},ne=A({__name:"LoginBlock",setup(r){function i(p){const h=p.split("@")[0];return V.kebabCase(h).toUpperCase().split("-").slice(0,2).map(g=>g[0]).join("")}const _=D(),{result:c,loading:u,refetch:m}=U(async()=>w.getAuthor());async function B(){await w.logout(),W.shutdown(),m(),_.push({name:"login"})}function I(p){localStorage.setItem("locale",String(p.key)),window.location.reload()}return(p,h)=>{const g=L("RouterLink");return e(u)?(n(),l(e(R),{key:0})):e(c)?(n(),k("div",ae,[t(y,{class:"intercom-launcher",target:"_blank",type:"link",size:"small"},{default:a(()=>[t(e(j)),o(" "+s(e(d).translate("i18n_loginblock_support")),1)]),_:1}),t(e($),{placement:"bottomRight"},{content:a(()=>[f("div",te,[t(e(z),{size:"small",type:"secondary"},{default:a(()=>[o(s(e(c).claims.email),1)]),_:1}),t(e(F),{trigger:["click"]},{overlay:a(()=>[t(e(G),{onClick:I},{default:a(()=>[(n(!0),k(C,null,S(e(T),x=>(n(),l(e(M),{key:x.key},{default:a(()=>[o(s(x.value),1)]),_:2},1024))),128))]),_:1})]),default:a(()=>[t(e(b),{type:"text"},{default:a(()=>[f("div",oe,[t(e(O),{size:"20"}),o(" "+s(e(d).translate("i18n_loginblock_language")),1)])]),_:1})]),_:1}),t(e(b),{type:"text",onClick:B},{default:a(()=>[f("div",se,[t(e(H),{size:"20"}),o(" "+s(e(d).translate("i18n_loginblock_logout")),1)])]),_:1})])]),default:a(()=>[t(e(J),{align:"center",style:{cursor:"pointer"}},{default:a(()=>[t(e(X),{shape:"square"},{default:a(()=>[o(s(i(e(c).claims.email)),1)]),_:1})]),_:1})]),_:1})])):(n(),l(e(b),{key:2},{default:a(()=>[t(g,{to:"/login"},{default:a(()=>[o(s(e(d).translate("i18n_loginblock_login")),1)]),_:1})]),_:1}))}}}),re={class:"extra"},le=A({__name:"Navbar",props:{breadcrumb:{},showAiSparkles:{type:Boolean}},setup(r){const i=Y();return(_,c)=>(n(),l(e(ee),{style:{padding:"5px 25px",border:"1px solid #f0f0f0"}},{subTitle:a(()=>[r.breadcrumb?(n(),l(e(K),{key:0},{default:a(()=>[(n(!0),k(C,null,S(r.breadcrumb,(u,m)=>(n(),l(e(Q),{key:m},{default:a(()=>[t(e(E),{to:u.path},{default:a(()=>[o(s(u.label),1)]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1})):v("",!0)]),extra:a(()=>[f("div",re,[r.showAiSparkles?(n(),l(y,{key:0,type:"link",onClick:c[0]||(c[0]=u=>e(i).toggle())},{default:a(()=>[t(e(Z)),o(" "+s(e(d).translate("i18n_consolenavbar_ai_assistant")),1)]),_:1})):v("",!0),t(y,{href:e(N).DOCS,target:"_blank",type:"link"},{default:a(()=>[t(e(q)),o(" "+s(e(d).translate("i18n_consolenavbar_docs")),1)]),_:1},8,["href"]),t(ne)])]),_:1}))}}),he=P(le,[["__scopeId","data-v-a3489e41"]]);export{he as N};
//# sourceMappingURL=Navbar-CsiFYgrX.js.map
