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EAAAtD,EAAA,CAAA0C,UAAA5B,EAAA+C,aAAAlD,EAAAmD,oBAAArD,EAAAsD,oBAAArD,EAAAsD,YAAA,EAAA9E,GAAA+E,SAAAhE,GAAAuC,eAAA3B,EAAAqD,gBAAArF,EAAAqF,eAAA,KAAAtD,GAAA,GAAArB,EAAA+D,GAAA,EAAAvD,EAAA,CAAAqB,SAAAR,CAAA","sources":["webpack://_N_E/./components/ProductGridBlock/ProductGridBlock.js","webpack://_N_E/"],"sourcesContent":["import React,{Suspense} from 'react';\nimport PropTypes from 'prop-types';\nimport Block from '../../adapters/helpers/Block';\nimport { ProductGridBlockConstants } from '../../adapters/helpers/Constants';\nimport dynamic from 'next/dynamic';\nconst BodyText = dynamic(() => import('../BodyText/BodyText'));\nconst Eyebrow = dynamic(() => import('../Eyebrow/Eyebrow'));\nconst Heading = dynamic(() => import('../Heading/Heading'));\nimport Loader from '../../adapters/helpers/Loader';\nconst Disclaimer = dynamic(() => import('../Disclaimer/Disclaimer'));\nconst ProductsOverview = dynamic(() => import('../ProductsOverview/ProductsOverview'));\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(40483),a=t(24036),o=t(5152),d=t.n(o),i=t(47322),u=t(85893),c=d()((function(){return t.e(9875).then(t.bind(t,9875))}),{loadableGenerated:{webpack:function(){return[9875]}}}),s=d()((function(){return t.e(405).then(t.bind(t,405))}),{loadableGenerated:{webpack:function(){return[405]}}}),b=d()((function(){return t.e(2116).then(t.bind(t,92116))}),{loadableGenerated:{webpack:function(){return[92116]}}}),g=d()((function(){return t.e(7770).then(t.bind(t,77770))}),{loadableGenerated:{webpack:function(){return[77770]}}}),f=d()((function(){return t.e(9899).then(t.bind(t,79899))}),{loadableGenerated:{webpack:function(){return[79899]}}});function h(e){var l,t,o=e.extraAttributes,d=e.document,h=null==o||null==(l=o.entity)?void 0:l.relatedProducts,k=h||((null==d||null==(t=d.fields)?void 0:t.productList)?d.fields.productList:[]);return k?function(e,l,t){var o,d,h,k,p=new r.Z(l),x=p.getFieldValue(a.oq.title),m=p.getFieldValue(a.oq.titleLevel)||a.oq.two,w=p.getFieldValue(a.oq.classNames),q=p.getFieldValue(a.oq.anchorId),v=p.getFieldValue(a.oq.eyebrow),F=p.getFieldValue(a.oq.body),V=null==(o=p.getFieldValue(a.oq.seeMoreLabel))||null==(d=o.fields)?void 0:d.text,j=null==(h=p.getFieldValue(a.oq.seeLessLabel))||null==(k=h.fields)?void 0:k.text,L=p.getFieldValue(a.oq.maxNumberInlineItems),_=p.getFieldValue(a.oq.disclaimer),y=p.getFieldValue(a.oq.removeLazyLoad),N=!1,C=[\"ob-product-grid-block\"];w&&C.push(w);w&&-1!=w.indexOf(a.oq.whiteText)&&(N=!0);var T=p.getFieldValue(a.oq.radialBackground),G={bg:{backgroundColor:p.getFieldValue(a.oq.background)}},P={bg:{background:T}};if(0===e.length)return null;return(0,u.jsxs)(\"div\",{className:C.join(\" \"),id:q,style:G.bg?G.bg:null,children:[!!T&&(0,u.jsx)(\"span\",{className:\"radial-background\",style:P.bg?P.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)(f,{whiteText:N,itemsPerLine:L,seeMoreProductsText:V,seeLessProductsText:j,isCarrousel:t,products:e,removeLazyLoad:y,onClickCallback:l.onClickCallback})}),_&&(0,u.jsx)(g,{document:_})]})]})]})}(k,e,!!h):\"\"}}}]);"],"names":["self","webpackChunk_N_E","push","e","l","t","r","d","default","h","n","a","o","i","u","c","then","bind","loadableGenerated","webpack","s","b","g","f","k","p","x","m","w","q","v","F","V","j","L","_","y","N","C","T","G","P","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":""}