1import{j as t,A as x,a as E,_ as b,R as g,S as A,b as j,T as S}from"../js/app.DBQURsxG.js";import{R as y}from"./RichText.De7IQ3AH.js";import{W as v}from"./Wrapper.Cjc4gxtt.js";import{E as k}from"./EmptyState.CTCoYbam.js";import{E as C}from"./ErrorBoundary.C3jFYOOM.js";import{r as M}from"./elastic.CDqqVJuy.js";import{F as P}from"./FetchModel.ZlcilBl9.js";import{e as c}from"./error.BZboM8T-.js";import{d as R,e as q,h as w,A as D,a as H,b as T}from"./productObjectTable.BmziY019.js";import{f as $}from"./index.Cs3sfIVF.js";import"./vendor.CLXKpVbq.js";import"./lodash.B7ss2v9R.js";import"./Markdown.QdxFBtpr.js";import"./button.ByCG42iX.js";const f="AEHProductGridAttributesDynamic",B=new j({name:f,prefix:"o-"}),G=R.extend({content:w.optional(),configuration:q.extend({card:T.nullish(),table:H.nullish(),color:D.nullish()}).nullable()}),I=({componentModel:s})=>{var m,d,u,l,p,h;const{productState:e}=E(),r=b.uniqueId("quickSearch_");M.useEffect(()=>{typeof window.quicksearch<"u"&&window.quicksearch.init(`#${r}`)},[r]);const o=G.safeParse(s);if(!o.success){const{error:a}=o;return console.error(`${f}: ${$(a).toString()}`),t.jsx(k,{illustration:t.jsx(c.illustration,{}),title:c.title,description:c.description})}const{data:n}=o;if(!e||!e.meta)return null;let i=(m=n.content)==null?void 0:m.text;
1return Object.keys(e.meta).forEach(a=>{i=i==null?void 0:i.replaceAll(`||${e.meta[a].name}||`,e.meta[a].value.value)}),t.jsx("div",{id:r,className:"u-visibility--is-visible",children:t.jsx(g,{quickSearchId:r,children:t.jsx(v,{organismName:"o-AttributesDynamic",paddingTop:(u=(d=n.configuration)==null?void 0:d.padding)==null?void 0:u.top,paddingBottom:(p=(l=n.configuration)==null?void 0:l.padding)==null?void 0:p.bottom,children:t.jsxs(A,{...B("content",void 0,"u-quickSearch--is-searchable"),spacing:1,children:[((h=n.content)==null?void 0:h.title)&&t.jsx(S,{size:"h5",type:"u-heading-xs",text:n.content.title}),i&&t.jsx(y,{html:i,markdown:!0})]})})})})},Y=({pathModelHTLAttribute:s,componentModelHTLAttribute:e})=>t.jsx(C,{children:t.jsx(x,{componentName:"aeh-product-grid-attributes-dynamic",children:t.jsx(P,{pathModelHTLAttribute:s,componentModelHTLAttribute:e,children:(r,o)=>t.jsx(I,{pathModel:r,componentModel:o})})})});export{Y as AEHProductGridAttributesDynamic};
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.