(window.webpackJsonp=window.webpackJsonp||[]).push([[52],{999:function(e,t,s){"use strict";s.r(t),s.d(t,"default",(function(){return I}));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(1329),h=s(961),m=s(963),b=s(958),u=s(271),O=s(4),j=s(967),g=s(24),f=s(25),v=s(35),M=s(1311),y=s(281),_=s(20),C=s(1443);const w=Object(O.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 I=Object(c.connect)(((e,t)=>({list:e.getIn(["lists",t.params.id]),hasUnread:e.getIn(["timelines","list:"+t.params.id,"unread"])>0})))(i=Object(O.g)(((l=class extends n.a.PureComponent{constructor(){super(...arguments),this.handlePin=()=>{const{columnId:e,dispatch:t}=this.props;e?t(Object(u.h)(e)):(t(Object(u.e)("LIST",{id:this.props.params.id})),this.context.router.history.push("/"))},this.handleMove=e=>{const{columnId:t,dispatch:s}=this.props;s(Object(u.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(g.v)(t,{maxId:e}))},this.handleEditClick=()=>{this.props.dispatch(Object(v.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(v.d)("CONFIRM",{message:s.formatMessage(w.deleteMessage),confirm:s.formatMessage(w.deleteConfirm),onConfirm:()=>{e(Object(f.F)(i)),t?e(Object(u.h)(t)):this.context.router.history.push("/lists")}}))},this.handleRepliesPolicyChange=e=>{let{target:t}=e;const{dispatch:s}=this.props,{id:i}=this.props.params;s(Object(f.Q)(i,void 0,!1,t.value))}}componentDidMount(){const{dispatch:e}=this.props,{id:t}=this.props.params;e(Object(f.G)(t)),e(Object(g.v)(t)),this.disconnect=e(Object(j.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(f.G)(s)),t(Object(g.v)(s)),this.disconnect=t(Object(j.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)(y.b,{}))):!1===i?Object(o.a)(h.a,{},void 0,Object(o.a)(m.a,{multiColumn:s}),Object(o.a)(M.a,{})):n.a.createElement(h.a,{bindToDocument:!s,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},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)(O.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)(O.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)(O.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)(C.a,{name:"order",value:e,label:l.formatMessage(w[e]),checked:r===e,onChange:this.handleRepliesPolicyChange},e)))))),Object(o.a)(p.a,{trackScroll:!c,scrollKey:"list_timeline-"+t,timelineId:"list:"+a,onLoadMore:this.handleLoadMore,emptyMessage:Object(o.a)(O.b,{id:"empty_column.list",defaultMessage:"There is nothing in this list yet. When members of this list post new statuses, they will appear here."}),bindToDocument:!s}))}}).contextTypes={router:r.a.object},i=l))||i)||i}}]);
//# sourceMappingURL=list_timeline-37a93963ae443ed4f5b6.chunk.js.map