{"version":3,"file":"DimensionRenderer.cjs","sources":["../../../../../packages/react-binding/src/helperComponents/DimensionRenderer.tsx"],"sourcesContent":["import * as React from 'react'\nimport { ReactNode } from 'react'\nimport { EnvironmentMiddleware } from '../accessorPropagation'\nimport { Component } from '../coreComponents'\n\nexport type DimensionRendererProps = {\n\tdimension: string\n\tas: string\n\tchildren: ReactNode\n}\n\nexport const DimensionRenderer = Component<DimensionRendererProps>(({ dimension, as, children }, env) => {\n\tconst dimensions = env.getDimensionOrElse(dimension, [])\n\n\treturn <>\n\t\t{dimensions.map(value => (\n\t\t\t<EnvironmentMiddleware\n\t\t\t\tcreate={it => it.withVariables({ [as]: value })}\n\t\t\t\tkey={value}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</EnvironmentMiddleware>\n\t\t))}\n\t</>\n})\n"],"names":["Component","jsxDEV","Fragment","EnvironmentMiddleware","this"],"mappings":";;;;;AAWa,MAAA,oBAAoBA,oBAAkC,CAAC,EAAE,WAAW,IAAI,YAAY,QAAQ;AACxG,QAAM,aAAa,IAAI,mBAAmB,WAAW,CAAA,CAAE;AAEhD,SAAAC,8BAAAA,OAAAC,cAAAA,UAAA,EACL,UAAW,WAAA,IAAI,CACf,UAAAD,8BAAA;AAAA,IAACE,mBAAA;AAAA,IAAA;AAAA,MACA,QAAQ,QAAM,GAAG,cAAc,EAAE,CAAC,EAAE,GAAG,OAAO;AAAA,MAG7C;AAAA,IAAA;AAAA,IAFI;AAAA,IAFN;AAAA,IAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA;AAAA,IAAAC;AAAAA,EAAA,CAMA,EARK,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EASP,GAAAA,MAAA;AACD,CAAC;;"}