import{__assign as e}from"../../node_modules/tslib/tslib.es6.js";import t from"react";import{SupportedLanguages as i}from"../Bloc/BlocTypes.js";import{DEFAULT_BLOC_PROPERTIES as n}from"../Bloc/BlocProperties.js";var o=e({},n),r=function(e){var i=e.items,n=void 0===i?[]:i,o=e.heading,r=void 0===o?{}:o;return t.createElement(t.Fragment,null,t.createElement("h2",{className:"flexHeading",style:{color:r.color}},r.text),t.createElement("div",{className:"flexBox"},n.map((function(e,i){return t.createElement(t.Fragment,{key:e.id+"-"+i},t.createElement("div",{className:"flexItem",id:e.id,style:{width:e.widthPercentage+"%"}},t.createElement("h5",{style:{color:e.title.color},className:"flexItemHeading"},e.title.text),t.createElement("div",{style:{color:e.description.color},className:"flexItemDescription"},e.description.text)),t.createElement("style",{jsx:!0},"\n          .flexItem {\n            margin-top: 50px;\n            margin-right: 25px;\n          }\n          .flexItemHeading {\n            margin-bottom: 25px;\n            font-weight: bold;\n          }\n          .flexItemDescription {\n            font-size: 0.75em;\n          }\n        "))}))),t.createElement("style",{jsx:!0},"\n          .flexHeading {\n            font-size: 28px !important;\n            font-weight: 700;\n          }\n          .flexBox {\n            display: flex;\n            flex-wrap: wrap;\n            justify-content: space-between;\n          }\n        "))},l={items:[],heading:{text:{}}},c=function(t,i,n){var o;void 0===t&&(t=l),t||(t=l);var r=i.heading,c=i.items,a=void 0===c?[]:c,s=e(e({},t.heading?t.heading.text:{}),((o={})[n]=r?r.text:"",o)),x=a.map((function(i,o){var r,l,c,a,s=t.items[o];return s?e(e(e({},s),i),{description:{color:i.description.color,text:e(e({},s.description.text),(r={},r[n]=i.description.text,r))},title:{color:i.title.color,text:e(e({},s.title.text),(l={},l[n]=i.title.text,l))}}):e(e({},i),{description:{color:i.description.color,text:(c={},c[n]=i.description.text,c)},title:{color:i.title.color,text:(a={},a[n]=i.title.text,a)}})}));return e(e({},t),{heading:{text:s,color:i.heading?i.heading.color:""},items:x})},a=function(t,n,o,r){void 0===r&&(r=i.English);var l=t.heading,c=t.items;c&&0!==c.length||(c=n.items),n||(n={});var a={heading:(void 0!==l.text?l.text[o]:l.text[r])||(n.heading&&n.heading.text?n.heading.text:"")},s=c.map((function(t){var i=t.description,n=t.title,l=i.text[o]||i.text[r],c=n.text[o]||n.text[r];return e(e({},t),{title:{text:c,color:n.color},description:{text:l,color:i.color}})}));return e(e(e(e({},n),t),a),{items:s})};export default r;export{o as DEFAULT_DYNAMIC_FLEX,r as DynamicFlex,c as dynamicFlexPropsGenerator,a as dynamicFlexPropsParser};
//# sourceMappingURL=DynamicFlex.js.map
