(window.webpackJsonp=window.webpackJsonp||[]).push([[67],{1126:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return x}));var s,o=n(0),i=n(1),a=n.n(i),c=n(12),l=n(4),d=n(3),m=n.n(d),r=n(1316),u=n(1302),h=n(1294),g=n(41),p=n(373),b=n(1362),M=n(1315);const y=Object(l.f)({filter_regex:{id:"home.column_settings.filter_regex",defaultMessage:"Filter out by regular expressions"},settings:{id:"home.settings",defaultMessage:"Column settings"}});let j=Object(l.g)(s=class extends a.a.PureComponent{render(){const{settings:e,onChange:t,intl:n}=this.props;return Object(o.a)("div",{},void 0,Object(o.a)("div",{className:"column-settings__row"},void 0,Object(o.a)(M.a,{settings:e,settingPath:["other","onlyMedia"],onChange:t,label:Object(o.a)(l.b,{id:"community.column_settings.media_only",defaultMessage:"Media only"})})),Object(o.a)("span",{className:"column-settings__section"},void 0,Object(o.a)(l.b,{id:"home.column_settings.advanced",defaultMessage:"Advanced"})),Object(o.a)("div",{className:"column-settings__row"},void 0,Object(o.a)(b.a,{settings:e,settingPath:["regex","body"],onChange:t,label:n.formatMessage(y.filter_regex)})))}})||s;var O=n(83);var f,I,v=Object(c.connect)(((e,t)=>{let{columnId:n}=t;const s=n,o=e.getIn(["settings","columns"]),i=o.findIndex((e=>e.get("uuid")===s));return{settings:s&&i>=0?o.get(i).get("params"):e.getIn(["settings","community"])}}),((e,t)=>{let{columnId:n}=t;return{onChange(t,s){e(n?Object(p.f)(n,t,s):Object(O.c)(["community",...t],s))}}}))(j),_=n(1318);const C=Object(l.f)({title:{id:"column.community",defaultMessage:"Local timeline"}});let x=Object(c.connect)(((e,t)=>{let{columnId:n}=t;const s=n,o=e.getIn(["settings","columns"]),i=o.findIndex((e=>e.get("uuid")===s)),a=n&&i>=0?o.get(i).getIn(["params","other","onlyMedia"]):e.getIn(["settings","community","other","onlyMedia"]),c=e.getIn(["timelines","community"+(a?":media":"")]);return{hasUnread:!!c&&c.get("unread")>0,onlyMedia:a}}))(f=Object(l.g)(((I=class extends a.a.PureComponent{constructor(){super(...arguments),this.handlePin=()=>{const{columnId:e,dispatch:t,onlyMedia:n}=this.props;t(e?Object(p.h)(e):Object(p.e)("COMMUNITY",{other:{onlyMedia:n}}))},this.handleMove=e=>{const{columnId:t,dispatch:n}=this.props;n(Object(p.g)(t,e))},this.handleHeaderClick=()=>{this.column.scrollTop()},this.setRef=e=>{this.column=e},this.handleLoadMore=e=>{const{dispatch:t,onlyMedia:n}=this.props;t(Object(g.s)({maxId:e,onlyMedia:n}))}}componentDidMount(){const{dispatch:e,onlyMedia:t}=this.props;e(Object(g.s)({onlyMedia:t})),this.disconnect=e(Object(_.a)({onlyMedia:t}))}componentDidUpdate(e){if(e.onlyMedia!==this.props.onlyMedia){const{dispatch:e,onlyMedia:t}=this.props;this.disconnect(),e(Object(g.s)({onlyMedia:t})),this.disconnect=e(Object(_.a)({onlyMedia:t}))}}componentWillUnmount(){this.disconnect&&(this.disconnect(),this.disconnect=null)}render(){const{intl:e,hasUnread:t,columnId:n,multiColumn:s,onlyMedia:i}=this.props,c=!!n;return a.a.createElement(u.a,{ref:this.setRef,name:"local",bindToDocument:!s,label:e.formatMessage(C.title)},Object(o.a)(h.a,{icon:"users",active:t,title:e.formatMessage(C.title),onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:c,multiColumn:s},void 0,Object(o.a)(v,{columnId:n})),Object(o.a)(r.a,{trackScroll:!c,scrollKey:"community_timeline-"+n,timelineId:"community"+(i?":media":""),onLoadMore:this.handleLoadMore,emptyMessage:Object(o.a)(l.b,{id:"empty_column.community",defaultMessage:"The local timeline is empty. Write something publicly to get the ball rolling!"}),bindToDocument:!s}))}}).defaultProps={onlyMedia:!1},I.contextTypes={router:m.a.object},f=I))||f)||f}}]);
//# sourceMappingURL=community_timeline-aacc2582f4c035c24e2b.chunk.js.map