import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import t,{useEffect as r}from"react";import"../../../node_modules/react-redux/es/index.js";import m from"../../common/Card/MediumCard.js";import{DEFAULT_BLOC_PROPERTIES as o}from"../../Bloc/BlocProperties.js";import{useDispatch as l}from"../../../node_modules/react-redux/es/hooks/useDispatch.js";import{useSelector as s}from"../../../node_modules/react-redux/es/hooks/useSelector.js";var i=e(e({},o),{apiUrl:"",type:"grid"});function a(e){var o=e.apiUrl,i=e.maxItem,a=e.loadNews,n=e.selectNews,d=l(),c=s(n);return r((function(){d(a(o))}),[o]),t.createElement(t.Fragment,null,t.createElement("div",{className:"container mt-5"},t.createElement("div",{className:"row"},c.slice(0,i).map((function(e){return t.createElement("div",{className:"col-12 col-sm-4 mt-2 mb-2",key:e.id},t.createElement(m,{title:e.title,text:e.content,date:e.publish_date,linkUrl:e.url,imageUrl:e.images.length>0?e.images[0]:"",imageHeight:189,youtube:null!=e.embed&&e.embed.length>0?e.embed[0]:"",linkText:"CLICK HERE TO READ MORE"}))})))))}export default a;export{i as DEFAULT_NEWS_EVENT};
//# sourceMappingURL=NewsEventGrid.js.map
