{"version":3,"file":"Creative-D2-We3Cr-chunk.js","sources":["../../../GSDClient/Scripts/Blocks/Creative.tsx"],"sourcesContent":["import { BreakPointHooks } from 'Hooks/BreakPointHooks';\nimport CreativeItem from 'Components/Creative/CreativeItem';\nimport { IDynamicCreativeBlockViewModel } from 'Types/Litium';\n\nconst { useGreater } = BreakPointHooks();\n\ninterface DynamicCreativeBlockViewModel extends IDynamicCreativeBlockViewModel {\n shouldLazyLoad?: boolean;\n}\n\nconst Creative = (props: DynamicCreativeBlockViewModel) => {\n const {\n backgroundColor,\n marginBewteenColumns,\n marginBetweenColumnsMobile,\n creativeItems,\n shouldLazyLoad = false,\n translations,\n } = props;\n\n const isGreater = useGreater('lg');\n\n const desktopColumnsDisposition = creativeItems\n .map(struc => `minmax(0, ${struc.columnSpan || 1}fr)`)\n .join(' ');\n\n const totalColumnSpan = creativeItems.reduce(\n (acc, struc) => acc + (struc.columnSpan || 1),\n 0\n );\n\n const columnsDisposition =\n creativeItems.length > 3 ? 'repeat(2, minmax(0, 1fr))' : '1fr';\n\n const mobileFullWidthItem = (index: number) =>\n creativeItems.length < 4 ||\n (creativeItems.length > 4 &&\n creativeItems.length % 2 &&\n index === creativeItems.length - 1);\n\n const determineMobileTextDisposition = (index: number) =>\n creativeItems.length > 3 &&\n (creativeItems.length % 2 === 0 || index !== creativeItems.length - 1);\n\n return (\n