import{_ as m}from"./AbstraButton.vue_vue_type_script_setup_true_lang.aefce2d3.js";import{A as C}from"./constants.d569f33d.js";import{d as x,e5 as S,i as B,u as e,o,a as d,S as w,a5 as A,f as a,b as t,g as s,e as _,d8 as L,ed as f,bR as g,cL as R,ej as I,ec as N,f1 as D,aR as $,h as k,_ as G}from"./jwt-decode.esm.54a1ea22.js";import{a as T}from"./asyncComputed.47aec2b5.js";import{G as V}from"./PhChats.vue.71e5cb89.js";import{F as z}from"./PhSignOut.vue.d1d6498f.js";import{l as h,o as j}from"./router.4dfadf5d.js";import{A as E}from"./index.966ac1b9.js";import{A as F}from"./index.c8a56795.js";import{u as O}from"./omniChatStore.dd7a1c46.js";import{G as P}from"./PhBookBookmark.vue.41108214.js";import{G as U}from"./PhSparkle.vue.b6712d34.js";import{A as q}from"./index.482df04a.js";import{B as H,A as M}from"./Breadcrumb.5c786c09.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[n]="b2550959-1e59-476d-9cb4-c080d75515b7",r._sentryDebugIdIdentifier="sentry-dbid-b2550959-1e59-476d-9cb4-c080d75515b7")}catch{}})();const J={key:1,style:{display:"flex","align-items":"center",gap:"16px"}},K={style:{display:"flex","flex-direction":"column",gap:"10px"}},Q={style:{display:"flex",gap:"5px"}},W=x({__name:"LoginBlock",setup(r){function n(y){const b=y.split("@")[0];return I.exports.kebabCase(b).toUpperCase().split("-").slice(0,2).map(u=>u[0]).join("")}const i=S(),{result:l,loading:p,refetch:c}=T(async()=>h.getAuthor());async function v(){await h.logout(),j.shutdown(),c(),i.push({name:"login"})}return(y,b)=>{const u=B("RouterLink");return e(p)?(o(),d(e(w),{key:0})):e(l)?(o(),A("div",J,[a(m,{class:"intercom-launcher",target:"_blank",type:"link",size:"small"},{default:t(()=>[a(e(V)),s(" Support ")]),_:1}),a(e(R),{placement:"bottomRight"},{content:t(()=>[_("div",K,[a(e(L),{size:"small",type:"secondary"},{default:t(()=>[s(f(e(l).claims.email),1)]),_:1}),a(e(g),{type:"text",onClick:v},{default:t(()=>[_("div",Q,[a(e(z),{size:"20"}),s(" Logout ")])]),_:1})])]),default:t(()=>[a(e(E),{align:"center",style:{cursor:"pointer"}},{default:t(()=>[a(e(F),{shape:"square"},{default:t(()=>[s(f(n(e(l).claims.email)),1)]),_:1})]),_:1})]),_:1})])):(o(),d(e(g),{key:2},{default:t(()=>[a(u,{to:"/login"},{default:t(()=>[s("Login")]),_:1})]),_:1}))}}}),X={class:"extra"},Y=x({__name:"Navbar",props:{breadcrumb:{},showAiSparkles:{type:Boolean}},setup(r){const n=O();return(i,l)=>(o(),d(e(q),{style:{padding:"5px 25px",border:"1px solid #f0f0f0"}},{subTitle:t(()=>[i.breadcrumb?(o(),d(e(H),{key:0},{default:t(()=>[(o(!0),A($,null,N(i.breadcrumb,(p,c)=>(o(),d(e(M),{key:c},{default:t(()=>[a(e(D),{to:p.path},{default:t(()=>[s(f(p.label),1)]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1})):k("",!0)]),extra:t(()=>[_("div",X,[i.showAiSparkles?(o(),d(m,{key:0,type:"link",onClick:l[0]||(l[0]=p=>e(n).toggle())},{default:t(()=>[a(e(U)),s(" AI Assistant ")]),_:1})):k("",!0),a(m,{href:e(C).DOCS,target:"_blank",type:"link"},{default:t(()=>[a(e(P)),s(" Docs ")]),_:1},8,["href"]),a(W)])]),_:1}))}});const me=G(Y,[["__scopeId","data-v-9083334a"]]);export{me as N};
//# sourceMappingURL=Navbar.ef64aa09.js.map
