1import{j as e}from"./main-CvdALITE.js";import{e as t,r as l}from"./vendor-C3lNgR8L.js";import{j as n,k as i,l as a,f as s,d as o,E as d,e as r}from"./index-DEDJm_k-.js";const c=c=>{var m,u,v,h,_,p,g,x;const{WIDGET_CHECK_FALSE:f}=s,{componentDataDispatcher:j,contentModel:b}=(e=>{const{id:s,contentModel:o,modelInternalName:d}=t.propsParser(e),r="swatch-grid-ssr",{componentDataDispatcher:c,setComponentDataDispatcher:m,isComponentLoaded:u,hasExperiments:v}=n({id:s,modelInternalName:d,modelKeyForSSR:r});let h;return(null==o?void 0:o.trim().length)&&(h=JSON.parse(o)),l.useEffect((()=>{var e;(u||v)&&(m({type:i.fetchingData}),(null==(e=null==o?void 0:o.trim())?void 0:e.length)&&(async()=>{m({type:i.dataFetched,data:await a(h,d,r,s,v)})})())}),[o,v]),{componentDataDispatcher:c,contentModel:o}})(c),{sectionHeadingTag:y,sectionHeadingSize:N,contentPosition:D,showsectionheading:E,selectLayout:L="fourgridlayout",preLoadImage:I=f,loadImageLazy:T=f}=t.propsParser(c),{componentData:w,isLoading:C}=j,H=`${y}`;return e.jsxs(e.Fragment,{children:[e.jsx(o,{loaderClassName:"mb-12 lg:mb-24",contentModel:b,isLoading:C,componentData:w}),(null==w?void 0:w.id)&&!C&&e.jsxs("div",{className:"container",children:[E===s.WIDGET_CHECK_TRUE&&((null==w?void 0:w.section_header)&&(null==(m=null==w?void 0:w.section_header[0])?void 0:m.section_heading)||(null==w?void 0:w.section_header)&&(null==(u=null==w?void 0:w.section_header[0])?void 0:u.section_description))&&e.jsxs("div",{className:`mb-8 last:mb-0 ${D}`,children:[(null==w?void 0:w.section_header)&&(null==(v=null==w?void 0:w.section_header[0])?void 0:v.section_heading)&&e.jsx(H,{className:`${N} mb-2 last:mb-0 font-secondary`,dangerouslySetInnerHTML:{__html:null==(h=null==w?void 0:w.section_header[0])?void 0:h.section_heading}}),(null==w?void 0:w.section_header)&&(null==(_=null==w?void 0:w.section_header[0])?void 0:_.section_description)&&e.jsx("p",{className:"text-sm font-normal text-neutral-700",dangerouslySetInnerHTML:{__html:null==(p=null==w?void 0:w.section_header[0])?void 0:p.section_description}})]}),e.jsx("div",{className:"flex flex-wrap -mx-4 gap-y-8",children:(null==w?void 0:w.swatches_items)&&(null==(g=null==w?void 0:w.swatches_items)?void 0:g.length)&&(null==(x=null==w?void 0:w.swatches_items)?void 0:x.map(((t,l)=>{var n,i;return e.jsx(e.Fragment,{children:e.jsx("div",{className:("fourgridlayout"===L?"lg:basis-3/12":"lg:basis-2/12")+" md:basis-3/12 sm:basis-4/12 basis-6/12 px-4",children:e.jsxs(d,{to:(null==t?void 0:t.button_link)?null==t?void 0:t.button_link:"/",target:(null==t?void 0:t.open_link_in_new_tab)?"_blank":"_self",className:"",children:[e.jsx("div",{className:"image mb-2",children:e.jsx(r,{name:"swatch item img",className:`w-full h-full ${"fourgridlayout"===L?"max-h-full":"max-h-[14rem]"} object-cover aspect-square`,height:180,width:180,src:(null==t?void 0:t.image)&&(null==t?void 0:t.image[0]),alt:null==t?void 0:t.title_text,title:null==t?void 0:t.title_text,lazyLoad:T===(null==(n=s)?void 0:n.WIDGET_CHECK_TRUE),preLoad:I===(null==(i=s)?void 0:i.WIDGET_CHECK_TRUE)})}),((null==t?void 0:t.title_text)||(null==t?void 0:t.description)||(null==t?void 0:t.description))&&e.jsxs("div",{className:"content",children:[(null==t?void 0:t.title_text)&&e.jsx("p",{className:"text-sm font-normal text-neutral-900 mb-1 last:mb-0",dangerouslySetInnerHTML:{__html:null==t?void 0:t.title_text}}),(null==t?void 0:t.description)&&e.jsx("p",{className:"text-xs text-neutral-500 font-light",dangerouslySetInnerHTML:{__html:null==t?void 0:t.description}})]})]})},l)})})))})]})]})};export{c as default};
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.