(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{558: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(16),p=r(14),O=r(11),j=r(27),h=r(12),m=r.n(h),d=r(26);function f(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:m()("alerts",e.color)},Object(c.createElement)(d.a,{tag:"h2",className:"alert-title"},e.title),Object(c.createElement)("div",null,Object(c.createElement)(d.a,{className:"alert-excerpt"},e.excerpt)),Object(c.createElement)(O.Link,{to:"/alert/".concat(e.id,"/")},Object(a.__)("Read more")))})))}var v=Object(p.b)((function(e){var t=e.settings.activeComponents.alerts;return{alertItems:t?t.settings.alerts:[]}}))(f),y=r(117),w=r(45),_=r(69),E=r(42),g=r(62);function k(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 P=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(g.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)(E.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?k(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(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)(_.a,null));var n=this.calculateKeyQuery(),s=n.key,l=n.query,o=!(r||!1);return Object(c.createElement)("div",null,Object(c.createElement)(w.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)(v,null),Object(c.createElement)(y.a,{key:s,id:s,query:l,simpleLoader:0,showFrontPageCards:o,template:"front-page"}))}}]),t}(c.Component);var N=Object(b.d)(O.withRouter,Object(p.b)((function(e,t){return{params:t.match.params,types:Object(j.c)(e)}})))(P),S=r(293);t.default=function(){return Object(c.createElement)("div",null,Object(c.createElement)("div",{className:"home-share-mobile"},Object(c.createElement)(S.a,null,Object(a.__)("Share"))),Object(c.createElement)("div",{className:"wall"},Object(c.createElement)(N,null)))}}}]);