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AA,CAAA2D,UAAA,mCAAAP,UAAA5B,EAAAuC,SAAA7C,CAAA,GAAAiD,MAAAC,OAAA,CAAAzD,KAAAvB,GAAAqE,MAAA,OAAA1D,EAAA2D,IAAA,SAAAC,UAAA,8CAAAI,SAAA,IAAAhE,EAAAiE,GAAA,EAAArE,EAAA0E,QAAA,EAAAC,SAAA,GAAAvE,EAAAiE,GAAA,EAAAlE,EAAAL,OAAA,KAAAsE,SAAA,GAAAhE,EAAAiE,GAAA,EAAAvD,EAAA,CAAA2C,UAAA5B,EAAA+C,aAAAlD,EAAAmD,oBAAArD,EAAAsD,oBAAArD,EAAAsD,YAAA,EAAAhF,GAAAiF,SAAAhE,GAAAuC,eAAA3B,EAAAqD,gBAAAvF,EAAAuF,eAAA,KAAAtD,GAAA,GAAAvB,EAAAiE,GAAA,EAAAtD,EAAA,CAAAoB,SAAAR,CAAA","sources":["webpack://_N_E/./components/ProductGridBlock/ProductGridBlock.js","webpack://_N_E/"],"sourcesContent":["import React , {Suspense} from 'react';\nimport dynamic from 'next/dynamic';\nimport PropTypes from 'prop-types';\nimport Block from '../../adapters/helpers/Block';\nimport { ProductGridBlockConstants } from '../../adapters/helpers/Constants';\nimport Loader from '../../adapters/helpers/Loader';\n\nconst BodyText = dynamic(() => import('../BodyText/BodyText'));\nconst Eyebrow = dynamic(() => import('../Eyebrow/Eyebrow'));\nconst Heading = dynamic(() => import('../Heading/Heading'));\nconst ProductsOverview = dynamic(() => import('../ProductsOverview/ProductsOverview'));\nconst Disclaimer = dynamic(() => import('../Disclaimer/Disclaimer'));\n\nexport default function ProductGridBlock(props) {\n const {extraAttributes, document} = props;\n\n const relatedProducts = extraAttributes?.entity?.relatedProducts;\n const products = (relatedProducts) ? relatedProducts :\n (document?.fields?.productList) ? document.fields.productList : [];\n\n return (products) ?\n renderProductGridBlock(products, props, !!relatedProducts) :\n '';\n}\n\nfunction renderProductGridBlock(products, props, isCarrousel) {\n const propsBlock = new Block(props);\n\n const title = propsBlock.getFieldValue(ProductGridBlockConstants.title);\n const titleLevel = propsBlock.getFieldValue(ProductGridBlockConstants.titleLevel) || ProductGridBlockConstants.two;\n const blockClassNames = propsBlock.getFieldValue(ProductGridBlockConstants.classNames);\n const anchorId = propsBlock.getFieldValue(ProductGridBlockConstants.anchorId);\n const eyebrow = propsBlock.getFieldValue(ProductGridBlockConstants.eyebrow);\n const body = propsBlock.getFieldValue(ProductGridBlockConstants.body);\n const seeMoreLabel = propsBlock.getFieldValue(ProductGridBlockConstants.seeMoreLabel)?.fields?.text;\n const seeLessLabel = propsBlock.getFieldValue(ProductGridBlockConstants.seeLessLabel)?.fields?.text;\n const itemsPerLine = propsBlock.getFieldValue(ProductGridBlockConstants.maxNumberInlineItems);\n const disclaimer = propsBlock.getFieldValue(ProductGridBlockConstants.disclaimer);\n const removeLazyLoad = propsBlock.getFieldValue(ProductGridBlockConstants.removeLazyLoad);\n let whiteText = false;\n\n const classNames = ['ob-product-grid-block'];\n\n if(blockClassNames) {\n classNames.push(blockClassNames);\n }\n\n if (blockClassNames && blockClassNames.indexOf(ProductGridBlockConstants.whiteText) != -1) {\n whiteText = true;\n }\n\n const radialBackground = propsBlock.getFieldValue(ProductGridBlockConstants.radialBackground);\n\n const style = {\n bg: {\n backgroundColor: propsBlock.getFieldValue(ProductGridBlockConstants.background)\n }\n }\n\n const radialStyle = {\n bg: {\n background: radialBackground\n }\n }\n\n if (products.length === 0) {\n return null;\n }\n\n return (\n
\n {!!radialBackground && }\n
\n {!!eyebrow && {eyebrow}}\n {!!title && {title}}\n {!!body && {body}}\n {Array.isArray(products) && products.length > 0 &&\n
\n }>\n \n \n {disclaimer &&\n \n }\n
\n }\n
\n
\n )\n}\n\nrenderProductGridBlock.propTypes = {\n onClickCallback: PropTypes.func.isRequired,\n}\n","\"use strict\";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7093],{37093:function(e,l,t){t.r(l),t.d(l,{default:function(){return h}});var n=t(67294),r=t(5152),a=t.n(r),o=t(40483),d=t(24036),i=t(47322),u=t(85893),c=a()((function(){return Promise.all([t.e(9238),t.e(8491)]).then(t.bind(t,9875))}),{loadableGenerated:{webpack:function(){return[9875]}}}),s=a()((function(){return Promise.all([t.e(4885),t.e(4419),t.e(9238),t.e(8996),t.e(7890)]).then(t.bind(t,405))}),{loadableGenerated:{webpack:function(){return[405]}}}),b=a()((function(){return Promise.all([t.e(9238),t.e(5061)]).then(t.bind(t,92116))}),{loadableGenerated:{webpack:function(){return[92116]}}}),g=a()((function(){return t.e(9899).then(t.bind(t,79899))}),{loadableGenerated:{webpack:function(){return[79899]}}}),f=a()((function(){return Promise.all([t.e(4885),t.e(4419),t.e(9238),t.e(8996),t.e(7770)]).then(t.bind(t,77770))}),{loadableGenerated:{webpack:function(){return[77770]}}});function h(e){var l,t,r=e.extraAttributes,a=e.document,h=null==r||null==(l=r.entity)?void 0:l.relatedProducts,k=h||((null==a||null==(t=a.fields)?void 0:t.productList)?a.fields.productList:[]);return k?function(e,l,t){var r,a,h,k,p=new o.Z(l),x=p.getFieldValue(d.oq.title),m=p.getFieldValue(d.oq.titleLevel)||d.oq.two,w=p.getFieldValue(d.oq.classNames),q=p.getFieldValue(d.oq.anchorId),v=p.getFieldValue(d.oq.eyebrow),F=p.getFieldValue(d.oq.body),V=null==(r=p.getFieldValue(d.oq.seeMoreLabel))||null==(a=r.fields)?void 0:a.text,j=null==(h=p.getFieldValue(d.oq.seeLessLabel))||null==(k=h.fields)?void 0:k.text,L=p.getFieldValue(d.oq.maxNumberInlineItems),_=p.getFieldValue(d.oq.disclaimer),y=p.getFieldValue(d.oq.removeLazyLoad),N=!1,C=[\"ob-product-grid-block\"];w&&C.push(w);w&&-1!=w.indexOf(d.oq.whiteText)&&(N=!0);var P=p.getFieldValue(d.oq.radialBackground),T={bg:{backgroundColor:p.getFieldValue(d.oq.background)}},G={bg:{background:P}};if(0===e.length)return null;return(0,u.jsxs)(\"div\",{className:C.join(\" \"),id:q,style:T.bg?T.bg:null,children:[!!P&&(0,u.jsx)(\"span\",{className:\"radial-background\",style:G.bg?G.bg:null}),(0,u.jsxs)(\"div\",{className:\"ob-product-grid-block-wrapper\",children:[!!v&&(0,u.jsx)(s,{className:\"ob-product-grid-block__eyebrow\",children:v}),!!x&&(0,u.jsx)(b,{className:\"ob-product-grid-block__heading\",tag:\"h\".concat(m),whiteText:N,children:x}),!!F&&(0,u.jsx)(c,{className:\"ob-product-grid-block__body-text\",whiteText:N,children:F}),Array.isArray(e)&&e.length>0&&(0,u.jsxs)(\"div\",{className:\"ob-product-grid-block__product-grid-wrapper\",children:[(0,u.jsx)(n.Suspense,{fallback:(0,u.jsx)(i.default,{}),children:(0,u.jsx)(g,{whiteText:N,itemsPerLine:L,seeMoreProductsText:V,seeLessProductsText:j,isCarrousel:t,products:e,removeLazyLoad:y,onClickCallback:l.onClickCallback})}),_&&(0,u.jsx)(f,{document:_})]})]})]})}(k,e,!!h):\"\"}}}]);"],"names":["self","webpackChunk_N_E","push","e","l","t","r","d","default","h","n","a","o","i","u","c","Promise","all","then","bind","loadableGenerated","webpack","s","b","g","f","k","p","x","m","w","q","v","F","V","j","L","_","y","N","C","P","T","G","extraAttributes","document","entity","relatedProducts","fields","productList","Z","getFieldValue","oq","title","titleLevel","two","classNames","anchorId","eyebrow","body","seeMoreLabel","text","seeLessLabel","maxNumberInlineItems","disclaimer","removeLazyLoad","indexOf","whiteText","radialBackground","bg","backgroundColor","background","length","jsxs","className","join","id","style","children","jsx","tag","concat","Array","isArray","Suspense","fallback","itemsPerLine","seeMoreProductsText","seeLessProductsText","isCarrousel","products","onClickCallback"],"sourceRoot":""}