1import{Dr as e,Et as t,Nn as n,Ot as r,Xr as i,_r as a,at as o,ei as s,gt as c,ht as l,pn as u,yn as d,yt as f}from"./DKhRV_XD.js";import{n as p}from"./C-6T4v8M.js";import{t as m}from"./Cxhj5wsi.js";import{t as h}from"./cwTry1s-.js";var g={class:`min-w-0 overflow-hidden rounded-box bg-base-100 p-2 shadow-card`},_=[`aria-expanded`,`aria-controls`],v={class:`min-w-0 wrap-anywhere`},y=[`id`],b=[`onClick`],x={key:1,class:`min-w-0 w-full`,open:``},S={class:`min-w-0 w-full wrap-break-word whitespace-normal text-base font-semibold leading-snug`},C={class:`min-w-0 w-full`},w=[`onClick`],T={class:`min-w-0 wrap-break-word font-medium`},E=Object.assign(r({__name:`ProductCategoryMenu`,props:{groups:{},selectedId:{}},emits:[`select`],setup(r,{emit:E}){let D=r,{t:O}=p(),k=a(!1),A=a(null),j=n(),M=l(()=>D.groups.flatMap(e=>e.items).find(e=>e.id===D.selectedId)?.label),N=E,P=h;function F(e){N(`select`,e),k.value=!1,A.value?.getClientRects().length&&A.value.focus({preventScroll:!0})}return(n,a)=>{let l=m;return u(),f(`aside`,g,[c(`button`,{ref_key:`mobileToggle`,ref:A,type:`button`,class:`flex min-h-12 w-full items-center justify-between gap-3 px-3 py-2 text-left font-bold text-primary lg:hidden`,"aria-expanded":e(k),"aria-controls":e(j),onClick:a[0]||=t=>k.value=!e(k)},[c(`span`,v,s(e(M)||e(O)(`products.categories`)),1),t(l,{name:`i-lucide-chevron-down`,class:i([`size-4 shrink-0 transition-transform motion-reduce:transition-none`,e(k)?`rotate-180`:``]),"aria-hidden":`true`},null,8,[`class`])],8,_),c(`ul`,{id:e(j),class:i([`menu menu-md min-w-0 w-full`,e(k)?``:`hidden! lg:flex!`])},[(u(!0),f(o,null,d(r.groups,t=>(u(),f(`li`,{key:t.title,class:`min-w-0`},[e(P)(t)&&t.items[0]?(u(),f(`button`,{key:0,type:`button`,class:i([`min-w-0 w-full max-w-full wrap-break-word whitespace-normal rounded-field px-3 py-2 text-left text-base font-semibold leading-snug`,r.selectedId===t.items[0].id?`menu-active bg-primary! text-primary-content!`:``]),onClick:e=>F(t.items[0].id)},s(t.title),11,b)):(u(),f(`details`,x,[c(`summary`,S,s(t.title),1),c(`ul`,C,[(u(!0),f(o,null,d(t.items,e=>(u(),f(`li`,{key:e.id,class:`min-w-0`},[c(`button`,{type:`button`,class:i([`min-w-0 w-full max-w-full wrap-break-word whitespace-normal text-left leading-snug`,r.selectedId===e.id?`menu-active bg-primary! text-primary-content!`:``]),onClick:t=>F(e.id)},[c(`span`,T,s(e.label),1)],10,w)]))),128))])]))]))),128))],10,y)])}}}),{__name:`ProductCategoryMenu`});export{E as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.