(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{546:function(e,t,r){"use strict";r.r(t);var c=r(0),a=r(1),n=r(5),s=r(6),l=r(7),o=r(9),i=r(8),u=r(10),b=r(17),p=r(12),O=r(15),j=r(11),h=r(27),m=r(14),d=r.n(m),f=r(24);function v(e){var t=e.alertItems;return Object(c.createElement)("div",{className:"alerts-wrapper clearfix"},t.map((function(e){return Object(c.createElement)("article",{key:"alert-".concat(e.id),className:d()("alerts",e.color)},Object(c.createElement)(f.a,{tag:"h2",className:"alert-title"},e.title),Object(c.createElement)("div",null,Object(c.createElement)(f.a,{className:"alert-excerpt"},e.excerpt)),Object(c.createElement)(j.Link,{to:"/alert/".concat(e.id,"/")},Object(a.__)("Read more")))})))}var y=Object(p.b)((function(e){var t=e.settings.activeComponents.alerts;return{alertItems:t?t.settings.alerts:[]}}))(v),w=r(117),_=r(43),E=r(67),g=r(41),k=r(60);function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,c)}return r}var N=function(e){function t(){var e,r;Object(s.a)(this,t);for(var c=arguments.length,a=new Array(c),n=0;n<c;n++)a[n]=arguments[n];return(r=Object(o.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(a)))).state={search:""},r.renderSearch=function(e){r.setState({search:e})},r}return Object(u.a)(t,e),Object(l.a)(t,[{key:"calculateKeyQuery",value:function(){var e=this.props.params.typeId,t=this.state.search,r={per_page:18,context:"view"},c="home-cards";if(t&&(r.search=t,c="".concat(c,"-").concat(Object(k.a)())),e){switch(e){case"dekode-news":r.post_types="dekode-news, nisje-news-group";break;case"dekode-events":r.post_types="dekode-events, nisje-event-group";break;default:r.type=e}c="".concat(c,"-").concat(e)}return{key:c,query:r}}},{key:"noPostsFound",value:function(){var e=this.state.search,t=e?Object(a.sprintf)(Object(a.__)('No items found when searching for "%s"'),e.trim()):Object(a.__)("No items found.");return Object(c.createElement)(g.a,{title:t})}},{key:"getFilterActions",value:function(){var e=this.props.params.typeId,t=this.props.types,r=[{title:Object(a.__)("All"),href:"/",isActive:!e}],c=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({"dekode-news":Object(a.__)("News"),"dekode-events":Object(a.__)("Events")},t);return Object.keys(c).forEach((function(t){var a=e===t;r.push({title:c[t],href:"/type/".concat(t),isActive:a})})),r}},{key:"render",value:function(){var e=this.props,t=e.loadingContent,r=e.params.typeId;if(t)return Object(c.createElement)("div",null,Object(c.createElement)(E.a,null));var n=this.calculateKeyQuery(),s=n.key,l=n.query,o=!(r||!1);return Object(c.createElement)("div",null,Object(c.createElement)(_.a,{filterActions:this.getFilterActions(),filterButton:Object(a.__)("Filter"),heading:Object(a.__)("Wall"),renderSearch:this.renderSearch,searchButton:Object(a.__)("Search"),searchPlaceholder:Object(a.__)("Search Wall")}),Object(c.createElement)(y,null),Object(c.createElement)(w.a,{key:s,id:s,query:l,simpleLoader:0,showFrontPageCards:o,template:"front-page"}))}}]),t}(O.Component);var S=Object(b.d)(j.withRouter,Object(p.b)((function(e,t){return{params:t.match.params,types:Object(h.c)(e)}})))(N),A=r(291);t.default=function(){return Object(c.createElement)("div",null,Object(c.createElement)("div",{className:"home-share-mobile"},Object(c.createElement)(A.a,null,Object(a.__)("Share"))),Object(c.createElement)("div",{className:"wall"},Object(c.createElement)(S,null)))}}}]);