1import{j as t,A as w,a as S,n as E,_ as n,b as P,R as v,S as A,T as O}from"../js/app.CzHXv3OC.js";import{M as _}from"./Markdown.Bs47RbOr.js";import{W as B}from"./Wrapper.DVjqp0wx.js";import{V as M}from"./ViewMoreWrapper.DrDw4_-p.js";import{E as T}from"./ErrorBoundary.BSDeRbzo.js";import{p as q}from"./productAttributes.CaCCGjBi.js";import{p as z}from"./productIsEmpty.CCfoVqob.js";import{p as C}from"./productSplitBy.BG8tTjfz.js";import{r as l}from"./elastic.CDqqVJuy.js";import{F as R}from"./FetchModel.b4lX_zup.js";import{A as F}from"./ArrowRight.DAkN58oO.js";import{L as G}from"./ListItem.Bci3Zx_Y.js";import{L as N}from"./ListItemIcon.QJQUI4e8.js";import{L as V}from"./ListItemText.BMiklBDj.js";import{a as $}from"./listItemTextClasses.BTk6l-j9.js";const W={layout:"grid",splitBy:"none",maxItems:9999,cardLayout:"image_right",configuration:{padding:{top:"none",bottom:"none"},card:{size:"6",alignment:"space-between",aspectRatio:"1:1",zoom:!0}}},u=new P({name:"ProductGridObjectsList",prefix:"o-"}),H=({componentModel:a})=>{var f,x,g,j,b;const{productState:r}=S(),i=E(W,a),c=n.uniqueId("quickSearch_");l.useEffect(()=>{typeof window.quicksearch<"u"&&window.quicksearch.init(`#${c}`)},[c]);const[d,y]=l.useState(void 0);if(l.useEffect(()=>{r&&y({attributes:n.get(r,"meta"),name:n.get(r,"name"),content:n.get(r,"description"),productId:n.get(r,"pimID")})},[r]),!d||!d.attributes)return null;const o=q(i,d);if(z(o))return null;const h=[];for(const e in o){const m=[];for(const s in o[e]){const p=[];o[e][s].title&&p.push(`${t.jsxs("strong",{children:[o[e][s].title,":"," "]},`title-${e}${s}`)} `),p.push(t.jsx(_,{markdown:o[e][s].content},`markdown-${e}${s}`)),m.push(t.jsxs(G,{...u("ListItem"),children:[t.jsx(N,{children:o[e][s].content&&t.jsx(F,{})}),t.jsx(V,{children:p})]},`grid-${e}${s}`))}const L=n.take(m,i.maxItems),I=n.slice(m,i.maxItems+1);h[e]={title:e,html:t.jsxs(t.Fragment,{children:[t.jsx($,{dense:!0,...u("List"),children:L},`initial-list-${e}`),I.length>0&&t.jsx(M,{children:t.jsx($,{dense:!0,...u("List"),children:I},`chunk-list-${e}`)})]})}}const k=C(i.splitBy,h);return t.jsx("div",{id:c,className:"u-visibility--is-visible",children:t.jsx(v,{quickSearchId:c,children:t.jsx(B,{organismName:"o-ProductGridObjectsList",paddingTop:(x=(f=i.configuration)==null?void 0:f.padding)==null?void 0:x.top,paddingBottom:(j=(g=i.configuration)==null?void 0:g.padding)==null?void 0:j.bottom,children:t.jsxs(A,{spacing:2,children:[((b=i.content)==null?void 0:b.title)&&t.jsx(O,{size:"h5",type:i.titleSize,text:i.content.title}),k]})})})})},D=({pathModelHTLAttribute:a,componentModelHTLAttribute:r})=>t.jsx(T,{children:t.jsx(w,{componentName:"aeh-product-grid-objects-list",children:t.jsx(R,{pathModelHTLAttribute:a,componentModelHTLAttribute:r,children:(i,c)=>t.jsx(H,{pathModel:i,componentModel:c})})})}),at=Object.freeze(Object.defineProperty({__proto__:null,AEHProductGridObjectsList:D},Symbol.toStringTag,{value:"Module"}));export{H as I,at as i};
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.