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,UAAA,iDAAAM,IAAA,IAAAC,MAAA,CAAAlD,GAAAsC,UAAA7B,EAAAsC,SAAAhD,CAAA,KAAAK,GAAA,GAAAnB,EAAA+D,GAAA,EAAArE,EAAA,CAAAgE,UAAA,mDAAAL,UAAA7B,EAAAsC,SAAA3C,CAAA,GAAA+C,MAAAC,OAAA,CAAAnD,KAAA1B,GAAA8E,MAAA,OAAApE,EAAA+D,GAAA,SAAAL,UAAA,8DAAAI,SAAA,GAAA9D,EAAA+D,GAAA,EAAAtD,EAAA,CAAA4C,UAAA7B,EAAA6C,aAAA/C,EAAAgD,oBAAAlD,EAAAmD,oBAAAlD,EAAAmD,YAAA,EAAAzD,GAAA0D,SAAAzD,GAAA0D,gBAAAlF,EAAAkF,eAAA,CAAA1C,gBAAAlB,EAAA,KAAAS,GAAA,GAAAvB,EAAA+D,GAAA,EAAArD,EAAA,CAAAoB,SAAAP,CAAA","sources":["webpack://_N_E/./components/ProductVariantsRecommanderBlock/ProductVariantsRecommanderBlock.js","webpack://_N_E/"],"sourcesContent":["import React from 'react';\nimport dynamic from 'next/dynamic';\nimport PropTypes from 'prop-types';\nimport Block from '../../adapters/helpers/Block';\nimport { ProductGridBlockConstants } from '../../adapters/helpers/Constants';\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 ProductVariantsRecommanderBlock(props) {\n const {extraAttributes, document} = props;\n\n const productOverview = extraAttributes?.entity?.productOverview;\n const productVariants = productOverview?.fields?.otherRecommendedVariants?.fields?.productVariants || productOverview?.fields?.productVariants;\n\n const products = (productVariants) ? productVariants :\n (document?.fields?.productList) ? document.fields.productList : [];\n\n return (products) ?\n renderProductVariantsRecommanderBlock(products, productOverview, props, !!productVariants) :\n '';\n}\n\nfunction renderProductVariantsRecommanderBlock(products, productOverview, props, isCarrousel) {\n const propsBlock = new Block(props);\n\n const title = propsBlock.getFieldValue(ProductGridBlockConstants.title);\n const titleLevel = propsBlock.getFieldValue(ProductGridBlockConstants.titleLevel) || ProductGridBlockConstants.one;\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 let whiteText = false;\n\n const classNames = ['ob-product-variants-recommander-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 background: propsBlock.getFieldValue(ProductGridBlockConstants.background)\n }\n }\n\n const radialStyle = {\n bg: {\n background: radialBackground\n }\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 {disclaimer &&\n \n }\n
\n
\n )\n}\n\nrenderProductVariantsRecommanderBlock.propTypes = {\n onClickCallback: PropTypes.func.isRequired,\n}\n","\"use strict\";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5598],{15598:function(e,l,n){n.r(l),n.d(l,{default:function(){return m}});n(67294);var r=n(5152),t=n.n(r),a=n(40483),o=n(24036),i=n(85893),d=t()((function(){return Promise.all([n.e(9238),n.e(8491)]).then(n.bind(n,9875))}),{loadableGenerated:{webpack:function(){return[9875]}}}),u=t()((function(){return Promise.all([n.e(4885),n.e(4419),n.e(9238),n.e(8996),n.e(7890)]).then(n.bind(n,405))}),{loadableGenerated:{webpack:function(){return[405]}}}),c=t()((function(){return Promise.all([n.e(9238),n.e(5061)]).then(n.bind(n,92116))}),{loadableGenerated:{webpack:function(){return[92116]}}}),s=t()((function(){return n.e(9899).then(n.bind(n,79899))}),{loadableGenerated:{webpack:function(){return[79899]}}}),b=t()((function(){return Promise.all([n.e(4885),n.e(4419),n.e(9238),n.e(8996),n.e(7770)]).then(n.bind(n,77770))}),{loadableGenerated:{webpack:function(){return[77770]}}});function m(e){var l,n,r,t,m,p,g=e.extraAttributes,f=e.document,h=null==g||null==(l=g.entity)?void 0:l.productOverview,k=(null==h||null==(n=h.fields)||null==(r=n.otherRecommendedVariants)||null==(t=r.fields)?void 0:t.productVariants)||(null==h||null==(m=h.fields)?void 0:m.productVariants),v=k||((null==f||null==(p=f.fields)?void 0:p.productList)?f.fields.productList:[]);return v?function(e,l,n,r){var t,m,p,g,f=new a.Z(n),h=f.getFieldValue(o.oq.title),k=f.getFieldValue(o.oq.titleLevel)||o.oq.one,v=f.getFieldValue(o.oq.classNames),x=f.getFieldValue(o.oq.anchorId),w=f.getFieldValue(o.oq.eyebrow),V=f.getFieldValue(o.oq.body),q=null==(t=f.getFieldValue(o.oq.seeMoreLabel))||null==(m=t.fields)?void 0:m.text,F=null==(p=f.getFieldValue(o.oq.seeLessLabel))||null==(g=p.fields)?void 0:g.text,_=f.getFieldValue(o.oq.maxNumberInlineItems),N=f.getFieldValue(o.oq.disclaimer),j=!1,y=[\"ob-product-variants-recommander-block\"];v&&y.push(v);v&&-1!=v.indexOf(o.oq.whiteText)&&(j=!0);var L=f.getFieldValue(o.oq.radialBackground),C={bg:{background:f.getFieldValue(o.oq.background)}},P={bg:{background:L}};return(0,i.jsxs)(\"div\",{className:y.join(\" \"),id:x,style:C.bg?C.bg:null,children:[!!L&&(0,i.jsx)(\"span\",{className:\"radial-background\",style:P.bg?P.bg:null}),(0,i.jsxs)(\"div\",{className:\"ob-product-variants-recommander-block-wrapper\",children:[!!w&&(0,i.jsx)(u,{className:\"ob-product-variants-recommander-block__eyebrow\",children:w}),!!h&&(0,i.jsx)(c,{className:\"ob-product-variants-recommander-block__heading\",tag:\"h\".concat(k),whiteText:j,children:h}),!!V&&(0,i.jsx)(d,{className:\"ob-product-variants-recommander-block__body-text\",whiteText:j,children:V}),Array.isArray(e)&&e.length>0&&(0,i.jsx)(\"div\",{className:\"ob-product-variants-recommander-block__product-grid-wrapper\",children:(0,i.jsx)(s,{whiteText:j,itemsPerLine:_,seeMoreProductsText:q,seeLessProductsText:F,isCarrousel:r,products:e,onClickCallback:n.onClickCallback,productOverview:l})}),N&&(0,i.jsx)(b,{document:N})]})]})}(v,h,e,!!k):\"\"}}}]);"],"names":["self","webpackChunk_N_E","push","e","l","n","r","d","default","m","t","a","o","i","Promise","all","then","bind","loadableGenerated","webpack","u","c","s","b","p","g","f","h","k","v","x","w","V","q","F","_","N","j","y","L","C","P","extraAttributes","document","entity","productOverview","fields","otherRecommendedVariants","productVariants","productList","Z","getFieldValue","oq","title","titleLevel","one","classNames","anchorId","eyebrow","body","seeMoreLabel","text","seeLessLabel","maxNumberInlineItems","disclaimer","indexOf","whiteText","radialBackground","bg","background","jsxs","className","join","id","style","children","jsx","tag","concat","Array","isArray","length","itemsPerLine","seeMoreProductsText","seeLessProductsText","isCarrousel","products","onClickCallback"],"sourceRoot":""}