1import{r as e}from"./rolldown-runtime-S-ySWqyJ.js";import{a as t,i as n}from"./framework-DC_sNd-Z.js";import{t as r}from"./createLucideIcon-ChPu-klF.js";import{t as i}from"./arrow-right-DKcNuF_P.js";import{a,i as o}from"./experience-C7YZySpJ.js";import{t as s}from"./sliders-horizontal-CXFJAYI1.js";import{t as c}from"./x-SKlrWNbJ.js";import l from"./link-DHKg5xGm.js";import{t as u}from"./image-DLFb8uZ3.js";var d=r(`git-compare`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`,key:`19pyzm`}]]),f=e(t(),1),p=n();function m({products:e}){let t=[`All`,...new Set(e.map(e=>e.category))],n=[`All applications`,...new Set(e.flatMap(e=>o[e.slug]?.applications??[]))],[r,m]=(0,f.useState)(`All`),[h,g]=(0,f.useState)(`All applications`),[_,v]=(0,f.useState)([]),y=(0,f.useMemo)(()=>e.filter(e=>{let t=r===`All`||e.category===r,n=h===`All applications`||o[e.slug]?.applications.includes(h);return t&&n}),[h,r,e]),b=_.map(t=>e.find(e=>e.slug===t)).filter(Boolean);function x(e){v(t=>t.includes(e)?t.filter(t=>t!==e):t.length<3?[...t,e]:t)}return(0,p.jsxs)(`section`,{className:`section product-explorer`,"data-reveal":!0,children:[(0,p.jsxs)(`div`,{className:`shell explorer-toolbar`,children:[(0,p.jsxs)(`div`,{className:`explorer-filter-group`,children:[(0,p.jsx)(`span`,{className:`explorer-filter-label`,id:`explorer-category-label`,children:`Category`}),(0,p.jsx)(`div`,{className:`explorer-category-tabs`,role:`tablist`,"aria-labelledby":`explorer-category-label`,children:t.map(e=>(0,p.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":e===r,onClick:()=>m(e),children:e},e))})]}),(0,p.jsxs)(`label`,{className:`application-filter`,children:[(0,p.jsx)(s,{}),(0,p.jsx)(`span`,{children:`Application`}),(0,p.jsx)(`select`,{value:h,onChange:e=>g(e.target.value),children:n.map(e=>(0,p.jsx)(`option`,{children:e},e))})]})]}),(0,p.jsxs)(`div`,{className:`shell explorer-summary`,children:[(0,p.jsxs)(`span`,{children:[(0,p.jsx)(`strong`,{children:y.length}),` products matched`]}),(0,p.jsx)(`span`,{children:`Select up to three modules to compare.`})]}),(0,p.jsx)(`div`,{className:`shell explorer-grid`,children:y.map(e=>{let t=o[e.slug],n=_.includes(e.slug);return(0,p.jsxs)(`article`,{className:`explorer-card ${n?`is-selected`:``}`,children:[(0,p.jsxs)(l,{className:`explorer-card-visual`,href:`/products/${e.slug}`,"aria-label":`View ${e.model}`,children:[(0,p.jsx)(`span`,{className:`technical-grid`}),(0,p.jsx)(u,{src:e.image,alt:`${e.model} ${e.title} installed product render`,fill:!0,unoptimized:!0,sizes:`(max-width: 680px) 100vw, 33vw`}),(0,p.jsx)(`span`,{className:`explorer-card-category`,children:e.category})]}),(0,p.jsxs)(`div`,{className:`explorer-card-copy`,children:[(0,p.jsxs)(`div`,{className:`explorer-card-id`,children:[(0,p.jsx)(`strong`,{children:e.model}),(0,p.jsx)(`h2`,{children:e.title})]}),(0,p.jsx)(`p`,{children:t?.valueLine??e.summary}),(0,p.jsx)(`dl`,{className:`explorer-card-specs`,children:e.specifications.slice(0,3).map(e=>(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`dt`,{children:e.label}),(0,p.jsx)(`dd`,{children:e.value})]},e.label))}),(0,p.jsx)(`ul`,{className:`explorer-card-apps`,children:e.applications.slice(0,3).map(e=>(0,p.jsxs)(`li`,{children:[(0,p.jsx)(a,{}),e]},e))}),(0,p.jsxs)(`div`,{className:`explorer-card-actions`,children:[(0,p.jsxs)(l,{className:`text-link`,href:`/products/${e.slug}`,children:[`Explore product `,(0,p.jsx)(i,{})]}),(0,p.jsxs)(`button`,{className:n?`is-selected`:``,type:`button`,"aria-pressed":n,disabled:!n&&_.length===3,onClick:()=>x(e.slug),children:[(0,p.jsx)(d,{}),n?`Selected`:`Compare`]})]})]})]},e.slug)})}),b.length>0&&(0,p.jsxs)(`div`,{className:`shell compare-tool`,"aria-live":`polite`,children:[(0,p.jsxs)(`div`,{className:`compare-heading`,children:[(0,p.jsxs)(`div`,{children:[(0,p.jsx)(d,{}),(0,p.jsxs)(`span`,{children:[(0,p.jsx)(`small`,{children:`Product comparison`}),(0,p.jsxs)(`strong`,{children:[b.length,` of 3 selected`]})]})]}),(0,p.jsxs)(`button`,{type:`button`,onClick:()=>v([]),children:[(0,p.jsx)(c,{}),`Clear`]})]}),(0,p.jsxs)(`div`,{className:`compare-grid`,role:`region`,"aria-label":`Scrollable product comparison`,tabIndex:0,style:{gridTemplateColumns:`160px repeat(${b.length}, minmax(0, 1fr))`},children:[(0,p.jsx)(`span`,{className:`compare-label`,children:`Model`}),b.map(e=>(0,p.jsx)(`strong`,{children:e.model},e.slug)),(0,p.jsx)(`span`,{className:`compare-label`,children:`Best for`}),b.map(e=>(0,p.jsx)(`span`,{children:o[e.slug]?.applications.slice(0,2).join(` / `)},e.slug)),(0,p.jsx)(`span`,{className:`compare-label`,children:`App control`}),b.map(e=>
1(0,p.jsx)(`span`,{children:o[e.slug]?.appControls.slice(0,2).join(` / `)},e.slug)),(0,p.jsx)(`span`,{className:`compare-label`,children:`Channels`}),b.map(e=>(0,p.jsx)(`span`,{children:e.specifications.find(e=>e.label===`Channels`)?.value??`Application-specific`},e.slug))]})]})]})}export{m as ProductExplorer};
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.