1import{a as e,n as t,t as n}from"./jsx-runtime-B-hcVAMW.js";import{m as r}from"./index-BcpP6UB0.js";import{t as i}from"./Reveal-sBJ0Darj.js";import{t as a}from"./FolderCarte-IHTmdoZe.js";var o=e(t(),1),s=n();function c({documents:e,familles:t,messageVide:n}){let[c,l]=(0,o.useState)(`tous`),u=(0,o.useMemo)(()=>t.filter(t=>e.some(e=>e.famille_id===t.id)),[t,e]),d=u.length>=2,f=d&&u.some(e=>e.id===c)?c:`tous`,p=f===`tous`?e:e.filter(e=>e.famille_id===f),m=(0,o.useMemo)(()=>new Map(t.map(e=>[e.id,e.nom])),[t]);return(0,s.jsxs)(s.Fragment,{children:[d?(0,s.jsxs)(`div`,{className:`mb-14 flex flex-wrap justify-center gap-3`,role:`group`,"aria-label":`Filtrer par famille de produits`,children:[(0,s.jsx)(r,{onClick:()=>l(`tous`),variant:f===`tous`?`primary`:`outline`,size:`sm`,"aria-pressed":f===`tous`,children:`Tous`}),u.map(e=>(0,s.jsx)(r,{onClick:()=>l(e.id),variant:f===e.id?`primary`:`outline`,size:`sm`,"aria-pressed":f===e.id,children:e.nom},e.id))]}):null,(0,s.jsx)(`div`,{className:`grid gap-8 md:grid-cols-2 lg:grid-cols-3`,children:p.map((e,t)=>(0,s.jsx)(i,{delay:t*70,children:(0,s.jsx)(a,{folder:e,famille:e.famille_id?m.get(e.famille_id):void 0})},e.id))}),p.length===0?(0,s.jsx)(`p`,{className:`prose-editorial text-center text-muted-foreground`,children:n}):null]})}export{c 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.