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{DEFAULT_BLOC_PROPERTIES as a}from"../Bloc/BlocProperties.js";import{Heading as n}from"../Typography/Heading.js";import{Paragraph as i}from"../Typography/Paragraph/Paragraph.js";import"../Typography/Paragraph/Paragraph-utils.js";import{Image as l}from"../Media/Image.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";var c=e(e({},a),{apiUrl:""});function s(e){var a=e.apiUrl,c=e.selectArticles,s=e.loadArticles,d=m(),p=o(c);return r((function(){d(s(a))}),[a]),t.createElement(t.Fragment,null,t.createElement("div",null,t.createElement("div",{className:"row"},t.createElement(n,{text:"Featured Articles",align:"left",fontSize:31,lineHeight:44,letterSpacing:"-1",fontFamily:"Avenir Next Bold",lumo:"secondary-base"}))),t.createElement("div",{className:"featured-articles container"},t.createElement("div",{className:"row"},(p||[]).slice(0,5).map((function(e){var r=e.images,a=e.title,m=e.publish_date;return t.createElement("div",{className:"col-xl-2 col-md-2 col-xs-12 featured-article-wrapper"},t.createElement("a",{href:"#",className:"featured-article-item"},t.createElement("div",{className:"featured-article-item-img"},t.createElement(l,{src:r.length>0?r[0]:"",alt:a,frameDirectionX:"right",width:"100%"})),t.createElement("div",{className:"featured-article-item-content"},t.createElement(n,{text:a,align:"left",fontSize:21,lineHeight:44,letterSpacing:"-1",fontFamily:"Avenir Next Bold",lumo:"secondary-base"}),t.createElement(i,{content:m,align:"left",fontSize:"21",lineHeight:"1.43",fontFamily:"Bressay",letterSpacing:"0",textTransform:"normal",lumo:"primary-dark"}))))})))),t.createElement("style",{jsx:!0},"\n        .featured-articles .row {\n          justify-content: space-evenly;\n        }\n\n        .featured-article-wrapper {\n          padding-left: 0;\n          padding-right: 0;\n        }\n\n        .featured-article-item {\n          width: 100%;\n          height: 100%;\n        }\n\n        .featured-article-item:hover {\n          text-decoration: none;\n        }\n\n        .featured-article-item-img {\n          height: 150px;\n        }\n\n        .featured-article-item-img img {\n          width: 100%;\n          height: 100%;\n          object-fit: cover;\n        }\n\n        .featured-article-item-content {\n          margin-top: 1.5rem;\n        }\n\n        :global(.featured-article-item-content .heading) {\n          margin-bottom: 0.2em !important;\n        }\n\n        :global(.featured-article-item-content .heading h1) {\n          margin-bottom: 0.2em !important;\n        }\n\n        @media (max-width: 1199px) {\n          .featured-article-item-img {\n            height: 120px;\n          }\n        }\n\n        @media (max-width: 767px) {\n          .featured-article-item-img {\n            height: 200px;\n          }\n        }\n      "))}export default s;export{c as DEFAULT_FEATURED_ARTICLES};
//# sourceMappingURL=FeaturedArticle.js.map
