(window.webpackJsonp=window.webpackJsonp||[]).push([[86],{1095:function(e,t,s){"use strict";s.r(t),s.d(t,"default",(function(){return w}));var i,l,o=s(0),a=s(1),n=s.n(a),c=s(12),d=s(3),r=s.n(d),p=s(1316),h=s(1302),b=s(1294),m=s(373),u=s(4),O=s(1318),j=s(41),g=s(40),f=s(51),v=s(1310),M=s(371),_=s(28),y=s(1431);const C=Object(u.f)({deleteMessage:{id:"confirmations.delete_list.message",defaultMessage:"Are you sure you want to permanently delete this list?"},deleteConfirm:{id:"confirmations.delete_list.confirm",defaultMessage:"Delete"},followed:{id:"lists.replies_policy.followed",defaultMessage:"Any followed user"},none:{id:"lists.replies_policy.none",defaultMessage:"No one"},list:{id:"lists.replies_policy.list",defaultMessage:"Members of the list"}});let w=Object(c.connect)(((e,t)=>({list:e.getIn(["lists",t.params.id]),hasUnread:e.getIn(["timelines","list:"+t.params.id,"unread"])>0})))(i=Object(u.g)(((l=class extends n.a.PureComponent{constructor(){super(...arguments),this.handlePin=()=>{const{columnId:e,dispatch:t}=this.props;e?t(Object(m.h)(e)):(t(Object(m.e)("LIST",{id:this.props.params.id})),this.context.router.history.push("/"))},this.handleMove=e=>{const{columnId:t,dispatch:s}=this.props;s(Object(m.g)(t,e))},this.handleHeaderClick=()=>{this.column.scrollTop()},this.setRef=e=>{this.column=e},this.handleLoadMore=e=>{const{id:t}=this.props.params;this.props.dispatch(Object(j.w)(t,{maxId:e}))},this.handleEditClick=()=>{this.props.dispatch(Object(f.d)("LIST_EDITOR",{listId:this.props.params.id}))},this.handleDeleteClick=()=>{const{dispatch:e,columnId:t,intl:s}=this.props,{id:i}=this.props.params;e(Object(f.d)("CONFIRM",{message:s.formatMessage(C.deleteMessage),confirm:s.formatMessage(C.deleteConfirm),onConfirm:()=>{e(Object(g.F)(i)),t?e(Object(m.h)(t)):this.context.router.history.push("/lists")}}))},this.handleRepliesPolicyChange=e=>{let{target:t}=e;const{dispatch:s,list:i}=this.props,{id:l}=this.props.params;this.props.dispatch(Object(g.Q)(l,void 0,!1,t.value))}}componentDidMount(){const{dispatch:e}=this.props,{id:t}=this.props.params;e(Object(g.G)(t)),e(Object(j.w)(t)),this.disconnect=e(Object(O.d)(t))}componentWillReceiveProps(e){const{dispatch:t}=this.props,{id:s}=e.params;s!==this.props.params.id&&(this.disconnect&&(this.disconnect(),this.disconnect=null),t(Object(g.G)(s)),t(Object(j.w)(s)),this.disconnect=t(Object(O.d)(s)))}componentWillUnmount(){this.disconnect&&(this.disconnect(),this.disconnect=null)}render(){const{hasUnread:e,columnId:t,multiColumn:s,list:i,intl:l}=this.props,{id:a}=this.props.params,c=!!t,d=i?i.get("title"):a,r=i?i.get("replies_policy"):void 0;return void 0===i?Object(o.a)(h.a,{},void 0,Object(o.a)("div",{className:"scrollable"},void 0,Object(o.a)(M.b,{}))):!1===i?Object(o.a)(h.a,{},void 0,Object(o.a)("div",{className:"scrollable"},void 0,Object(o.a)(v.a,{}))):n.a.createElement(h.a,{ref:this.setRef,label:d},Object(o.a)(b.a,{icon:"list-ul",active:e,title:d,onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:c,multiColumn:s,bindToDocument:!s},void 0,Object(o.a)("div",{className:"column-settings__row column-header__links"},void 0,Object(o.a)("button",{className:"text-btn column-header__setting-btn",tabIndex:"0",onClick:this.handleEditClick},void 0,Object(o.a)(_.a,{id:"pencil"})," ",Object(o.a)(u.b,{id:"lists.edit",defaultMessage:"Edit list"})),Object(o.a)("button",{className:"text-btn column-header__setting-btn",tabIndex:"0",onClick:this.handleDeleteClick},void 0,Object(o.a)(_.a,{id:"trash"})," ",Object(o.a)(u.b,{id:"lists.delete",defaultMessage:"Delete list"}))),void 0!==r&&Object(o.a)("div",{role:"group","aria-labelledby":"list-"+a+"-replies-policy"},void 0,Object(o.a)("span",{id:"list-"+a+"-replies-policy",className:"column-settings__section"},void 0,Object(o.a)(u.b,{id:"lists.replies_policy.title",defaultMessage:"Show replies to:"})),Object(o.a)("div",{className:"column-settings__row"},void 0,["none","list","followed"].map((e=>Object(o.a)(y.a,{name:"order",value:e,label:l.formatMessage(C[e]),checked:r===e,onChange:this.handleRepliesPolicyChange},e))))),Object(o.a)("hr",{})),Object(o.a)(p.a,{trackScroll:!c,scrollKey:"list_timeline-"+t,timelineId:"list:"+a,onLoadMore:this.handleLoadMore,emptyMessage:Object(o.a)(u.b,{id:"empty_column.list",defaultMessage:"There is nothing in this list yet."}),bindToDocument:!s}))}}).contextTypes={router:r.a.object},i=l))||i)||i}}]);
//# sourceMappingURL=list_timeline-75571c9f5273db2242a4.chunk.js.map