import{_ as y}from"./AbstraButton.vue_vue_type_script_setup_true_lang-BPJs_oss.js";import{A as N}from"./constants-BkB36yfF.js";import{a as A,ad as D,a4 as L,p as l,b as k,u as e,e as n,b6 as R,j as a,w as t,S as o,U as s,ae as d,bc as $,h as _,ak as z,bd as F,B as b,be as G,M as C,W as S,bf as M,bg as T,a9 as V,g as v,bh as E,aN as P}from"./jwt-decode.esm-CQm3LY6y.js";import{a as U}from"./asyncComputed-_0zTJceu.js";import{G as j,F as O,a as q}from"./PhTranslate.vue-Bt-h5c91.js";import{F as H}from"./PhSignOut.vue-B-W1FD5i.js";import{b as w,a as W}from"./router-iclNQ3sb.js";import{S as J,B as K,A as Q}from"./index-Bt656mEJ.js";import{A as X}from"./index-BtK_X6EO.js";import{u as Y}from"./omniChatStore-2WRSxoBF.js";import{G as Z}from"./PhSparkle.vue-BKkSD4x6.js";import{A as ee}from"./index-BaY8SZ_8.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]="f988cd09-cc0b-408c-bf65-e45914ec051c",r._sentryDebugIdIdentifier="sentry-dbid-f988cd09-cc0b-408c-bf65-e45914ec051c")}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=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 f=D(),{result:c,loading:u,refetch:m}=U(async()=>w.getAuthor());async function B(){await w.logout(),W.shutdown(),m(),f.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",te,[a(y,{class:"intercom-launcher",target:"_blank",type:"link",size:"small"},{default:t(()=>[a(e(j)),o(" "+s(e(d).translate("i18n_loginblock_support")),1)]),_:1}),a(e($),{placement:"bottomRight"},{content:t(()=>[_("div",ae,[a(e(z),{size:"small",type:"secondary"},{default:t(()=>[o(s(e(c).claims.email),1)]),_:1}),a(e(F),{trigger:["click"]},{overlay:t(()=>[a(e(G),{onClick:I},{default:t(()=>[(n(!0),k(C,null,S(e(T),x=>(n(),l(e(M),{key:x.key},{default:t(()=>[o(s(x.value),1)]),_:2},1024))),128))]),_:1})]),default:t(()=>[a(e(b),{type:"text"},{default:t(()=>[_("div",oe,[a(e(O),{size:"20"}),o(" "+s(e(d).translate("i18n_loginblock_language")),1)])]),_:1})]),_:1}),a(e(b),{type:"text",onClick:B},{default:t(()=>[_("div",se,[a(e(H),{size:"20"}),o(" "+s(e(d).translate("i18n_loginblock_logout")),1)])]),_:1})])]),default:t(()=>[a(e(J),{align:"center",style:{cursor:"pointer"}},{default:t(()=>[a(e(X),{shape:"square"},{default:t(()=>[o(s(i(e(c).claims.email)),1)]),_:1})]),_:1})]),_:1})])):(n(),l(e(b),{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=A({__name:"Navbar",props:{breadcrumb:{},showAiSparkles:{type:Boolean}},setup(r){const i=Y();return(f,c)=>(n(),l(e(ee),{style:{padding:"5px 25px",border:"1px solid #f0f0f0"}},{subTitle:t(()=>[r.breadcrumb?(n(),l(e(K),{key:0},{default:t(()=>[(n(!0),k(C,null,S(r.breadcrumb,(u,m)=>(n(),l(e(Q),{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(()=>[_("div",re,[r.showAiSparkles?(n(),l(y,{key:0,type:"link",onClick:c[0]||(c[0]=u=>e(i).toggle())},{default:t(()=>[a(e(Z)),o(" "+s(e(d).translate("i18n_consolenavbar_ai_assistant")),1)]),_:1})):v("",!0),a(y,{href:e(N).DOCS,target:"_blank",type:"link"},{default:t(()=>[a(e(q)),o(" "+s(e(d).translate("i18n_consolenavbar_docs")),1)]),_:1},8,["href"]),a(ne)])]),_:1}))}}),he=P(le,[["__scopeId","data-v-a3489e41"]]);export{he as N};
//# sourceMappingURL=Navbar-DWL_IiVK.js.map
