import{_ as m}from"./AbstraButton.vue_vue_type_script_setup_true_lang-D-iosY4j.js";import{A as v}from"./constants-B1LrRAnj.js";import{d as x,T as B,W as S,B as p,l as A,D as e,m as o,aP as w,g as a,G as t,$ as s,aW as D,V as f,q as _,Z as I,H as b,N as L,p as k,F as N,U as R,aX as $,ap as G}from"./jwt-decode.esm-Dca5fHH5.js";import{a as T}from"./asyncComputed-IJY6wgme.js";import{G as V}from"./PhChats.vue-D3T3i4Kd.js";import{F as z}from"./PhSignOut.vue-XpGBgo63.js";import{b as h,a as E}from"./router-D5wfdag3.js";import{S as F}from"./index-ZQBk4l6i.js";import{A as P}from"./index-BLK1I0IS.js";import{u as U}from"./omniChatStore-Bi-5MYwj.js";import{G as q}from"./PhBookBookmark.vue-DvO8S191.js";import{G as H}from"./PhSparkle.vue-Yp2ok4fJ.js";import{B as O,A as W,a as j}from"./index-CXHcOjiL.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]="08abf75d-0348-4944-8ffb-36c6d93ef208",r._sentryDebugIdIdentifier="sentry-dbid-08abf75d-0348-4944-8ffb-36c6d93ef208")}catch{}})();const M={key:1,style:{display:"flex","align-items":"center",gap:"16px"}},X={style:{display:"flex","flex-direction":"column",gap:"10px"}},Z={style:{display:"flex",gap:"5px"}},J=x({__name:"LoginBlock",setup(r){function n(y){const g=y.split("@")[0];return L.kebabCase(g).toUpperCase().split("-").slice(0,2).map(c=>c[0]).join("")}const i=B(),{result:l,loading:d,refetch:u}=T(async()=>h.getAuthor());async function C(){await h.logout(),E.shutdown(),u(),i.push({name:"login"})}return(y,g)=>{const c=S("RouterLink");return e(d)?(o(),p(e(w),{key:0})):e(l)?(o(),A("div",M,[a(m,{class:"intercom-launcher",target:"_blank",type:"link",size:"small"},{default:t(()=>[a(e(V)),s(" Support ")]),_:1}),a(e(D),{placement:"bottomRight"},{content:t(()=>[_("div",X,[a(e(I),{size:"small",type:"secondary"},{default:t(()=>[s(f(e(l).claims.email),1)]),_:1}),a(e(b),{type:"text",onClick:C},{default:t(()=>[_("div",Z,[a(e(z),{size:"20"}),s(" Logout ")])]),_:1})])]),default:t(()=>[a(e(F),{align:"center",style:{cursor:"pointer"}},{default:t(()=>[a(e(P),{shape:"square"},{default:t(()=>[s(f(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}))}}}),K={class:"extra"},Q=x({__name:"Navbar",props:{breadcrumb:{},showAiSparkles:{type:Boolean}},setup(r){const n=U();return(i,l)=>(o(),p(e(j),{style:{padding:"5px 25px",border:"1px solid #f0f0f0"}},{subTitle:t(()=>[i.breadcrumb?(o(),p(e(O),{key:0},{default:t(()=>[(o(!0),A(N,null,R(i.breadcrumb,(d,u)=>(o(),p(e(W),{key:u},{default:t(()=>[a(e($),{to:d.path},{default:t(()=>[s(f(d.label),1)]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1})):k("",!0)]),extra:t(()=>[_("div",K,[i.showAiSparkles?(o(),p(m,{key:0,type:"link",onClick:l[0]||(l[0]=d=>e(n).toggle())},{default:t(()=>[a(e(H)),s(" AI Assistant ")]),_:1})):k("",!0),a(m,{href:e(v).DOCS,target:"_blank",type:"link"},{default:t(()=>[a(e(q)),s(" Docs ")]),_:1},8,["href"]),a(J)])]),_:1}))}}),ce=G(Q,[["__scopeId","data-v-9083334a"]]);export{ce as N};
//# sourceMappingURL=Navbar-xNoiYIje.js.map
