import{_ as m}from"./AbstraButton.vue_vue_type_script_setup_true_lang.ce90d792.js";import{A as C}from"./constants.5f7db9f7.js";import{d as x,e5 as S,m as B,u as e,o,a as c,S as w,a5 as A,f as a,b as t,g as s,e as f,da as N,ed as _,bR as b,cN as R,el as I,ec as L,e$ as D,aR as $,h as k,_ as G}from"./jwt-decode.esm.95147216.js";import{a as T}from"./asyncComputed.15a1493f.js";import{G as V}from"./PhChats.vue.89b3bbbd.js";import{F as z}from"./PhSignOut.vue.88518a69.js";import{j as h,l as j}from"./router.09c25b35.js";import{A as E}from"./index.b1615145.js";import{A as F}from"./index.c7a02ea6.js";import{u as O}from"./omniChatStore.5c421f6e.js";import{G as P}from"./PhBookBookmark.vue.2d2fee75.js";import{G as U}from"./PhSparkle.vue.fc1ab30d.js";import{A as q}from"./index.ca714ac8.js";import{B as H,A as M}from"./Breadcrumb.fba01eee.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]="7e20c5e1-fae0-4cf2-af89-87724c0f1cc9",r._sentryDebugIdIdentifier="sentry-dbid-7e20c5e1-fae0-4cf2-af89-87724c0f1cc9")}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 g=y.split("@")[0];return I.exports.kebabCase(g).toUpperCase().split("-").slice(0,2).map(u=>u[0]).join("")}const i=S(),{result:l,loading:p,refetch:d}=T(async()=>h.getAuthor());async function v(){await h.logout(),j.shutdown(),d(),i.push({name:"login"})}return(y,g)=>{const u=B("RouterLink");return e(p)?(o(),c(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(()=>[f("div",K,[a(e(N),{size:"small",type:"secondary"},{default:t(()=>[s(_(e(l).claims.email),1)]),_:1}),a(e(b),{type:"text",onClick:v},{default:t(()=>[f("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(_(n(e(l).claims.email)),1)]),_:1})]),_:1})]),_:1})])):(o(),c(e(b),{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(),c(e(q),{style:{padding:"5px 25px",border:"1px solid #f0f0f0"}},{subTitle:t(()=>[i.breadcrumb?(o(),c(e(H),{key:0},{default:t(()=>[(o(!0),A($,null,L(i.breadcrumb,(p,d)=>(o(),c(e(M),{key:d},{default:t(()=>[a(e(D),{to:p.path},{default:t(()=>[s(_(p.label),1)]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1})):k("",!0)]),extra:t(()=>[f("div",X,[i.showAiSparkles?(o(),c(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.df02de65.js.map
