import"./Dosvfmhb.js";import{_ as T}from"./lcKie01k.js";import{_ as V,C as j,a as z,L as N,b as U,c as E}from"./qyVZgQpg.js";import{R as F,h as w,S as b,e as R,E as J,c as y,o as _,J as P,b as e,w as s,L as X,g as t,v as u,I as g,a as o,t as c,d as p,O as v,X as q,x as k}from"./BzhixHsn.js";import{_ as G,a as K,b as Q,c as W}from"./COjiOs1v.js";import{_ as Y,a as Z}from"./BSaEE8c4.js";import{_ as ee}from"./DdeO54y7.js";import{S as x}from"./DQj8dpKz.js";const te=F("monitor-cog",[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"m14.305 7.53.923-.382",key:"1mlnsw"}],["path",{d:"m15.228 4.852-.923-.383",key:"82mpwg"}],["path",{d:"m16.852 3.228-.383-.924",key:"ln4sir"}],["path",{d:"m16.852 8.772-.383.923",key:"1dejw0"}],["path",{d:"m19.148 3.228.383-.924",key:"192kgf"}],["path",{d:"m19.53 9.696-.382-.924",key:"fiavlr"}],["path",{d:"m20.772 4.852.924-.383",key:"1j8mgp"}],["path",{d:"m20.772 7.148.924.383",key:"zix9be"}],["path",{d:"M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7",key:"1tnzv8"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}]]),ne={class:"flex items-center gap-2 px-1 py-1.5 text-left text-sm"},se={class:"grid flex-1 text-left text-sm leading-tight"},ae={class:"truncate font-semibold"},oe={class:"truncate text-xs"},re=w({__name:"HeaderSettingsMenu",setup($){const a=b(),{t:n}=R(),r=J(!1),i=()=>{r.value=!0},l=()=>v("/admin"),m=async()=>{await a.logout(),await v("/sign-in")};return(de,f)=>{const S=X,M=K,C=Z,D=ee,A=Y,H=V,h=z,d=W,L=Q,B=G,I=U;return _(),y(P,null,[e(B,null,{default:s(()=>[e(M,{"as-child":""},{default:s(()=>[e(S,{variant:"ghost",size:"icon",class:"text-foreground bg-muted hover:bg-muted/90 hover:text-foreground h-11 w-11 rounded-lg transition-colors",title:t(n)("nav.settings")},{default:s(()=>[e(t(x),{class:"text-foreground/90 h-6 w-6"})]),_:1},8,["title"])]),_:1}),e(L,{align:"end",class:"w-64 rounded-lg"},{default:s(()=>[e(H,{class:"p-0 font-normal"},{default:s(()=>[o("div",ne,[e(A,{class:"h-9 w-9 rounded-lg"},{default:s(()=>[e(C,{src:t(a).user?.avatar_url||"",alt:t(n)("nav.avatar")},null,8,["src","alt"]),e(D,{class:"rounded-lg"},{default:s(()=>[e(t(j))]),_:1})]),_:1}),o("div",se,[o("span",ae,c(t(a).user?.name||t(n)("nav.mysteriousUser")),1),o("span",oe,c(t(a).user?.email),1)])])]),_:1}),e(h),e(d,{onClick:i},{default:s(()=>[e(t(x),{class:"h-4 w-4"}),p(" "+c(t(n)("nav.settings")),1)]),_:1}),t(a).user?.is_superuser?(_(),u(d,{key:0,onClick:l},{default:s(()=>[e(t(te),{class:"h-4 w-4"}),p(" "+c(t(n)("nav.adminPanel")),1)]),_:1})):g("",!0),e(h),e(d,{onClick:m},{default:s(()=>[e(t(N),{class:"h-4 w-4"}),p(" "+c(t(n)("common.logout")),1)]),_:1})]),_:1})]),_:1}),e(I,{open:t(r),"onUpdate:open":f[0]||(f[0]=O=>q(r)?r.value=O:null)},null,8,["open"])],64)}}}),ce=Object.assign(re,{__name:"HeaderSettingsMenu"}),_e={class:"bg-background/95 border-border/70 inset-x-0 top-0 isolate z-10 flex shrink-0 items-center gap-2 border-b backdrop-blur-md"},ie={class:"flex h-14 w-full items-center gap-3 px-5"},le={class:"ml-auto flex items-center gap-2"},me=w({__name:"AppHeader",setup($){const a=b();return(n,r)=>{const i=E,l=T,m=ce;return _(),y("header",_e,[o("div",ie,[e(i,{class:"-ml-1.5"}),n.$slots.default?(_(),u(l,{key:0,orientation:"vertical",class:"mr-2 data-[orientation=vertical]:h-4"})):g("",!0),k(n.$slots,"default"),o("div",le,[k(n.$slots,"right"),t(a).user?(_(),u(m,{key:0})):g("",!0)])])])}}}),we=Object.assign(me,{__name:"AppHeader"});export{we as _};
