webpackJsonp([32],{1865:function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var d=a(6),s=n(d),l=a(4),u=n(l),i=a(5),r=n(i),o=a(7),c=n(o),f=a(8),m=n(f),h=a(0),p=n(h),S=a(2),v=n(S),g=a(1),_=n(g),y=a(1835),k=n(y),b=a(1836),C=n(b),I=a(29),E=n(I),F=a(28),N=n(F),L=a(44),M=a(18),P=function(e){function t(e){(0,u.default)(this,t);var a=(0,c.default)(this,(t.__proto__||(0,s.default)(t)).call(this,e));return a.getStateFromStores=a.getStateFromStores.bind(a),a.isStateValid=a.isStateValid.bind(a),a.updateState=a.updateState.bind(a),a.state=a.getStateFromStores(e),a}return(0,m.default)(t,e),(0,r.default)(t,[{key:"getStateFromStores",value:function(e){var t=e.params.postid,a=E.default.getCurrent(),n=a?a.id:"",d=a?a.name:"",s=N.default.getCurrent();return{channelId:n,channelName:d,teamName:s?s.name:"",postId:t}}},{key:"isStateValid",value:function(){return""!==this.state.channelId&&this.state.teamName}},{key:"updateState",value:function(){this.setState(this.getStateFromStores(this.props))}},{key:"componentDidMount",value:function(){E.default.addChangeListener(this.updateState),N.default.addChangeListener(this.updateState),(0,p.default)("body").addClass("app__body")}},{key:"componentWillUnmount",value:function(){E.default.removeChangeListener(this.updateState),N.default.removeChangeListener(this.updateState),(0,p.default)("body").removeClass("app__body")}},{key:"componentWillReceiveProps",value:function(e){this.setState(this.getStateFromStores(e))}},{key:"render",value:function(){return this.isStateValid()?_.default.createElement("div",{id:"app-content",className:"app__content"},_.default.createElement(k.default,{channelId:this.state.channelId}),_.default.createElement(C.default,{channelId:this.state.channelId,focusedPostId:this.state.postId}),_.default.createElement("div",{id:"archive-link-home"},_.default.createElement(L.Link,{to:"/"+this.state.teamName+"/channels/"+this.state.channelName},_.default.createElement(M.FormattedMessage,{id:"center_panel.recent",defaultMessage:"Click here to jump to recent messages. "}),_.default.createElement("i",{className:"fa fa-arrow-down"})))):null}}]),t}(_.default.PureComponent);P.propTypes={params:v.default.object.isRequired},t.default=P}});
//# sourceMappingURL=32.aaeae3345093a908da83.js.map