{"version":3,"sources":["webpack:///./Avensia.Common/Features/Shared/Blocks/RowLayout/RowLayoutBlock.tsx"],"names":["RowLayoutContentArea","elementProps","componentProps","component","Component","layout","spacingBetweenBlocks","children","elementComponent","props","render","for","this","block","items"],"mappings":"6IAmBMA,EAAuB,SAAC,GAC5B,IAAAC,EAAA,EAAAA,aACA,IAAAC,eAAkB,IAAAC,UAAA,qBAA8B,+BAEhD,OACE,kBAACC,EAAS,eAAKH,GACb,kBAAC,IAAS,CAACI,OAAQH,EAAeG,OAAQC,qBAAsBJ,EAAeI,sBAC5EL,EAAaM,YAUP,sBAAqB,YAClC,2D,OACE,EAAAC,iBAAgF,SAAAC,GAAS,OACvF,kBAACT,EAAoB,CAACC,aAAcQ,EAAOP,eAAgB,EAAKO,S,EAKpE,OAP6B,iBAI3B,YAAAC,OAAA,WACE,OAAO,kBAAC,IAAW,CAACC,IAAKC,KAAKH,MAAMI,MAAMC,MAAOX,UAAWS,KAAKJ,oBAErE,EARkC,CACL,IAAMJ","file":"assets/66.chunk.d2bc1a29dc56a825c9b9.js","sourcesContent":["/**\r\n * @ComponentFor RowLayoutBlockViewModel\r\n */\r\nimport React from 'react';\r\nimport { EpiProperty, supportsComponentProp, ComponentType } from '@avensia/scope-episerver';\r\nimport RowLayoutBlockType from './RowLayoutBlockViewModel.type';\r\nimport BoxLayout, { LayoutType } from 'Shared/BoxLayout';\r\n\r\ntype RowLayoutContentAreaPropType = {\r\n  elementProps: React.HTMLAttributes<HTMLElement> & {\r\n    children?: React.ReactNode;\r\n  };\r\n  componentProps: {\r\n    component?: ComponentType;\r\n    layout: LayoutType[];\r\n    spacingBetweenBlocks: boolean;\r\n  };\r\n};\r\n\r\nconst RowLayoutContentArea = ({\r\n  elementProps,\r\n  componentProps: { component: Component = 'div', ...componentProps },\r\n}: RowLayoutContentAreaPropType) => {\r\n  return (\r\n    <Component {...elementProps}>\r\n      <BoxLayout layout={componentProps.layout} spacingBetweenBlocks={componentProps.spacingBetweenBlocks}>\r\n        {elementProps.children}\r\n      </BoxLayout>\r\n    </Component>\r\n  );\r\n};\r\n\r\ntype PropType = RowLayoutBlockType & {\r\n  component?: ComponentType;\r\n};\r\n\r\nexport default supportsComponentProp(\r\n  class RowLayoutBlock extends React.Component<PropType> {\r\n    elementComponent: React.StatelessComponent<React.HTMLAttributes<HTMLElement>> = props => (\r\n      <RowLayoutContentArea elementProps={props} componentProps={this.props} />\r\n    );\r\n    render() {\r\n      return <EpiProperty for={this.props.block.items} component={this.elementComponent} />;\r\n    }\r\n  },\r\n);\r\n"],"sourceRoot":""}