import{_ as f}from"./AbstraButton.vue_vue_type_script_setup_true_lang.fd128aaa.js";import{A as C}from"./constants.252b43be.js";import{d as x,e5 as S,m as B,u as e,o,a as p,S as w,a5 as A,f as a,b as t,g as s,e as m,da as N,ec as _,bR as b,cN as R,ek as I,eb as L,e$ as D,aR as $,h as k,_ as G}from"./jwt-decode.esm.d9ea36e7.js";import{a as T}from"./asyncComputed.1713f27a.js";import{G as V}from"./PhChats.vue.e1ec5374.js";import{F as z}from"./PhSignOut.vue.46959cea.js";import{j as h,l as j}from"./router.c145c879.js";import{A as E}from"./index.af64a47d.js";import{A as F}from"./index.62bc11b5.js";import{u as O}from"./omniChatStore.7dcc3075.js";import{G as P}from"./PhBookBookmark.vue.8824e128.js";import{G as U}from"./PhSparkle.vue.4b9b7766.js";import{B as q,A as H,b as M}from"./index.87cffabc.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]="1ef4e9a9-f103-4e30-81c4-e2d98f3055f1",r._sentryDebugIdIdentifier="sentry-dbid-1ef4e9a9-f103-4e30-81c4-e2d98f3055f1")}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(c=>c[0]).join("")}const i=S(),{result:l,loading:d,refetch:u}=T(async()=>h.getAuthor());async function v(){await h.logout(),j.shutdown(),u(),i.push({name:"login"})}return(y,g)=>{const c=B("RouterLink");return e(d)?(o(),p(e(w),{key:0})):e(l)?(o(),A("div",J,[a(f,{class:"intercom-launcher",target:"_blank",type:"link",size:"small"},{default:t(()=>[a(e(V)),s(" Support ")]),_:1}),a(e(R),{placement:"bottomRight"},{content:t(()=>[m("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(()=>[m("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(),p(e(b),{key:2},{default:t(()=>[a(c,{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(),p(e(M),{style:{padding:"5px 25px",border:"1px solid #f0f0f0"}},{subTitle:t(()=>[i.breadcrumb?(o(),p(e(q),{key:0},{default:t(()=>[(o(!0),A($,null,L(i.breadcrumb,(d,u)=>(o(),p(e(H),{key:u},{default:t(()=>[a(e(D),{to:d.path},{default:t(()=>[s(_(d.label),1)]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1})):k("",!0)]),extra:t(()=>[m("div",X,[i.showAiSparkles?(o(),p(f,{key:0,type:"link",onClick:l[0]||(l[0]=d=>e(n).toggle())},{default:t(()=>[a(e(U)),s(" AI Assistant ")]),_:1})):k("",!0),a(f,{href:e(C).DOCS,target:"_blank",type:"link"},{default:t(()=>[a(e(P)),s(" Docs ")]),_:1},8,["href"]),a(W)])]),_:1}))}});const ce=G(Y,[["__scopeId","data-v-9083334a"]]);export{ce as N};
//# sourceMappingURL=Navbar.844278fe.js.map
