import{Cf as e,Et as t}from"./messages-CA0k74Lg.js";import{t as n}from"./link-FSeyVZmM.js";import{t as r}from"./useNavigate-7u4DX0Ho.js";import{t as i}from"./useRouterState-B2FPPjEe.js";import{r as a}from"./search-provider-DWK6TDJZ.js";import{i as o,n as s}from"./button-CfqkRSM8.js";import{a as c,i as l,n as u,r as d,t as f}from"./select-0mb7fNAV.js";var p=e();function m({className:e,items:m,...h}){let g=r(),{location:_}=i(),v=m.find(e=>_.pathname===e.href)?.href??m[0]?.href??``;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`div`,{className:`p-1 md:hidden`,children:(0,p.jsxs)(f,{onValueChange:e=>{g({to:e})},value:v,children:[(0,p.jsx)(l,{className:`h-12 sm:w-48`,children:(0,p.jsx)(c,{placeholder:t()})}),(0,p.jsx)(u,{children:m.map(e=>(0,p.jsx)(d,{value:e.href,children:(0,p.jsxs)(`div`,{className:`flex gap-x-4 px-2 py-1`,children:[(0,p.jsx)(`span`,{className:`scale-125`,children:e.icon}),(0,p.jsx)(`span`,{className:`text-md`,children:e.title})]})},e.href))})]})}),(0,p.jsx)(a,{className:`hidden w-full min-w-40 bg-background px-1 py-2 md:block`,type:`always`,children:(0,p.jsx)(`nav`,{className:o(`flex space-x-2 py-1 lg:flex-col lg:space-x-0 lg:space-y-1`,e),...h,children:m.map(e=>(0,p.jsxs)(n,{activeOptions:{exact:!0},activeProps:{className:o(s({variant:`ghost`}),`justify-start bg-muted hover:bg-accent`)},className:o(s({variant:`ghost`}),`justify-start hover:bg-accent hover:underline`),to:e.href,children:[(0,p.jsx)(`span`,{className:`me-2`,children:e.icon}),e.title]},e.href))})})]})}export{m as t};