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