(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{633:function(e,t,r){"use strict";r.r(t);var n=r(0),c=r(19),a=r(6),s=r(11),o=r(12),i=r(14),l=r(13),u=r(5),p=r(23),b=r(17),f=r(1),O=r(10),j=r(8),m=r(46),h=r(30),d=r(4),y=r(41),v=r(15),w=r(34);function _(e){var t=e.alertItems;return Object(n.createElement)("div",{className:"alerts-wrapper clearfix"},t.map((function(e){return Object(n.createElement)("article",{key:"alert-".concat(e.id),className:Object(v.classnames)("alerts",e.color)},Object(n.createElement)(w.a,{tag:"h2",className:"alert-title"},e.title),Object(n.createElement)("div",null,Object(n.createElement)(w.a,{className:"alert-excerpt"},e.excerpt)),Object(n.createElement)(O.Link,{to:"/alert/".concat(e.id,"/")},Object(f.__)("Read more")))})))}var g=Object(b.b)((function(e){var t=e.settings.activeComponents.alerts;return{alertItems:t?t.settings.alerts:[]}}))(_),k=r(178),E=r(92),P=r(53),S=r(84);function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Object(u.a)(e);if(t){var c=Object(u.a)(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return Object(l.a)(this,r)}}var A=Object(j.getOption)("userContentTypes"),D=function(e){Object(i.a)(r,e);var t=N(r);function r(){var e;Object(s.a)(this,r);for(var n=arguments.length,c=new Array(n),a=0;a<n;a++)c[a]=arguments[a];return(e=t.call.apply(t,[this].concat(c))).state={search:""},e.renderSearch=function(t){e.setState({search:t})},e}return Object(o.a)(r,[{key:"calculateKeyQuery",value:function(){var e=this.props.params.typeId,t=this.state.search,r={per_page:18,context:"view"},n="home-cards";if(t&&(r.search=t,n="".concat(n,"-").concat(Object(S.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}n="".concat(n,"-").concat(e)}return{key:n,query:r}}},{key:"noPostsFound",value:function(){var e=this.state.search,t=e?Object(f.sprintf)(Object(f.__)('No items found when searching for "%s"'),e.trim()):Object(f.__)("No items found.");return Object(n.createElement)(P.a,{title:t})}},{key:"getFilterActions",value:function(){var e=this.props.params.typeId,t=[{title:Object(f.__)("All"),href:"/",isActive:!e}],r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach((function(t){Object(a.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({"dekode-news":Object(f.__)("News"),"dekode-events":Object(f.__)("Events")},A);return Object.keys(r).forEach((function(n){var c=e===n;t.push({title:r[n],href:"/type/".concat(n),isActive:c})})),t}},{key:"render",value:function(){var e=this.props,t=e.loadingContent,r=e.params.typeId,a=e.isWide;if(t)return Object(n.createElement)("div",null,Object(n.createElement)(E.a,null));var s=this.calculateKeyQuery(),o=s.key,i=s.query,l=!(r||!1);return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(m.Header,{title:Object(f.__)("Wall"),onSearch:this.renderSearch,filters:this.getFilterActions()},!a&&Object(n.createElement)(d.DropdownMenu,{position:"bottom center",toggleComponent:function(e){return Object(n.createElement)(m.HeaderButton,Object(c.a)({},e,{icon:h.compose}),Object(f.__)("Share"))},controls:[{title:Object(f.__)("Ask a question"),icon:"question",href:{pathname:"/new-question/",state:{modal:!0}}},{title:Object(f.__)("Start a discussion"),icon:"apple",href:{pathname:"/new-discussion/",state:{modal:!0}}},{title:Object(f.__)("Publish a resource"),icon:"earth",href:{pathname:"/new-resource/",state:{modal:!0}}},{title:Object(f.__)("Share an experience"),icon:"earth-alternative-filled",href:{pathname:"/new-experience/",state:{modal:!0}}},{title:Object(f.__)("Share a status"),icon:"messages-bubble-text",href:{pathname:"/new-status/",state:{modal:!0}}}]})),Object(n.createElement)(g,null),Object(n.createElement)(k.a,{id:o,key:o,query:i,showFrontPageCards:l,simpleLoader:0,template:"front-page"}))}}]),r}(n.Component);var R=Object(p.d)(O.withRouter,Object(b.b)((function(e,t){return{params:t.match.params}})),Object(y.withViewportMatch)({isWide:"wide"}))(D);t.default=function(){return Object(n.createElement)("div",{className:"wall"},Object(n.createElement)(R,null))}}}]);