import{k as p,i as b,j as e}from"./vendor-react-DrAK5R0M.js";import{h as f,cO as j,y as N,cP as w}from"./index-7eqLqzhB.js";import{j as k,bA as a,q as v,r as y,o as S,bB as C}from"./vendor-icons-Cu2Ube6F.js";function B({title:r,icon:t,iconClassName:d,description:s,badge:l,children:i}){const{setCommandPaletteOpen:m}=f(),{theme:o,toggle:c}=j(),n=p(),x=b(),{enabled:h}=N(),u=x.pathname==="/agent",g=()=>{w(),n("/login")};return e.jsxs("header",{className:"sticky top-0 z-30 flex items-center justify-between h-16 px-4 md:px-6 border-b border-border bg-background/80 backdrop-blur-md gap-2",children:[e.jsxs("div",{className:"hidden md:grid grid-cols-[auto_1fr] items-center gap-x-2 min-w-0 shrink",children:[t&&e.jsx(t,{className:`row-span-2 w-4.5 h-4.5 flex-shrink-0 self-start mt-1 ${d??"text-foreground"}`}),e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("h1",{className:"font-display font-bold text-lg text-foreground truncate",children:r}),l]}),s&&e.jsx("p",{className:`text-xs text-muted-foreground truncate mt-0.5 ${t?"col-start-2":"col-span-2"}`,children:s})]}),e.jsxs("div",{className:"flex items-center gap-1.5 md:ml-auto w-full md:w-auto",children:[i,h&&!u&&e.jsxs("button",{onClick:()=>n("/agent"),className:"relative p-1.5 rounded-xl bg-gradient-to-br from-violet-500 to-fuchsia-500 text-white shadow-sm hover:opacity-90 hover:shadow-md transition-all group",title:"Open Workspace Agent (⌘J)",children:[e.jsx(k,{className:"w-4 h-4"}),e.jsxs("kbd",{className:"absolute -bottom-1 -right-1 hidden md:inline-flex items-center gap-px text-[8px] font-mono leading-none bg-background/90 text-foreground border border-border px-0.5 py-px rounded shadow-sm",children:[e.jsx(a,{className:"w-2 h-2"}),"J"]})]}),e.jsx("button",{onClick:c,className:"p-2 rounded-xl text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",title:o==="dark"?"Switch to light mode":"Switch to dark mode",children:o==="dark"?e.jsx(v,{className:"w-4 h-4"}):e.jsx(y,{className:"w-4 h-4"})}),e.jsxs("button",{onClick:()=>m(!0),className:"flex items-center gap-2 flex-1 md:flex-none px-3 py-1.5 rounded-xl bg-muted text-muted-foreground text-sm hover:bg-muted/80 transition-colors min-h-[36px] md:min-h-0",children:[e.jsx(S,{className:"w-4 h-4 md:w-3.5 md:h-3.5 flex-shrink-0"}),e.jsx("span",{className:"text-left flex-1 md:flex-none",children:"Search..."}),e.jsxs("kbd",{className:"hidden md:inline-flex items-center gap-0.5 text-xs font-mono bg-background px-1.5 py-0.5 rounded-md border border-border",children:[e.jsx(a,{className:"w-3 h-3"}),"K"]})]}),e.jsx("button",{onClick:g,className:"p-2 rounded-xl text-muted-foreground hover:text-destructive hover:bg-muted transition-colors",title:"Sign out",children:e.jsx(C,{className:"w-4 h-4"})})]})]})}export{B as T};
