(window.webpackJsonp=window.webpackJsonp||[]).push([[65],{653:function(e,t,i){"use strict";i.r(t),i.d(t,"default",function(){return N});var a,s,l,r=i(0),n=i(2),o=i(6),c=i(1),d=i(3),p=i.n(d),b=i(21),u=i(5),h=i.n(u),m=i(900),j=i(632),O=i(627),f=i(221),v=i(7),g=i(636),_=i(34),y=i(31),M=i(50),C=i(896),I=i(271),k=Object(v.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"},all_replies:{id:"lists.replies_policy.all_replies",defaultMessage:"any followed user"},no_replies:{id:"lists.replies_policy.no_replies",defaultMessage:"no one"},list_replies:{id:"lists.replies_policy.list_replies",defaultMessage:"members of the list"}}),N=Object(b.connect)(function(e,t){return{list:e.getIn(["lists",t.params.id]),hasUnread:0<e.getIn(["timelines","list:"+t.params.id,"unread"])}})(a=Object(v.g)((l=s=function(a){function e(){for(var l,e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return l=a.call.apply(a,[this].concat(t))||this,Object(c.a)(Object(n.a)(l),"handlePin",function(){var e=l.props,t=e.columnId,i=e.dispatch;t?i(Object(f.h)(t)):(i(Object(f.e)("LIST",{id:l.props.params.id})),l.context.router.history.push("/"))}),Object(c.a)(Object(n.a)(l),"handleMove",function(e){var t=l.props,i=t.columnId;(0,t.dispatch)(Object(f.g)(i,e))}),Object(c.a)(Object(n.a)(l),"handleHeaderClick",function(){l.column.scrollTop()}),Object(c.a)(Object(n.a)(l),"setRef",function(e){l.column=e}),Object(c.a)(Object(n.a)(l),"handleLoadMore",function(e){var t=l.props.params.id;l.props.dispatch(Object(_.u)(t,{maxId:e}))}),Object(c.a)(Object(n.a)(l),"handleEditClick",function(){l.props.dispatch(Object(M.d)("LIST_EDITOR",{listId:l.props.params.id}))}),Object(c.a)(Object(n.a)(l),"handleDeleteClick",function(){var e=l.props,t=e.dispatch,i=e.columnId,a=e.intl,s=l.props.params.id;t(Object(M.d)("CONFIRM",{message:a.formatMessage(k.deleteMessage),confirm:a.formatMessage(k.deleteConfirm),onConfirm:function(){t(Object(y.F)(s)),i?t(Object(f.h)(i)):l.context.router.history.push("/lists")}}))}),Object(c.a)(Object(n.a)(l),"handleRepliesPolicyChange",function(e){var t=e.target,i=l.props,a=(i.dispatch,i.list,l.props.params.id);l.props.dispatch(Object(y.Q)(a,void 0,!1,t.value))}),l}Object(o.a)(e,a);var t=e.prototype;return t.componentDidMount=function(){var e=this.props.dispatch,t=this.props.params.id;e(Object(y.G)(t)),e(Object(_.u)(t)),this.disconnect=e(Object(g.d)(t))},t.componentWillUnmount=function(){this.disconnect&&(this.disconnect(),this.disconnect=null)},t.render=function(){var t=this,e=this.props,i=e.hasUnread,a=e.columnId,s=e.multiColumn,l=e.list,n=(e.intl,this.props.params.id),o=!!a,c=l?l.get("title"):n,d=l?l.get("replies_policy"):void 0;return void 0===l?Object(r.a)(j.a,{},void 0,Object(r.a)("div",{className:"scrollable"},void 0,Object(r.a)(I.a,{}))):!1===l?Object(r.a)(j.a,{},void 0,Object(r.a)("div",{className:"scrollable"},void 0,Object(r.a)(C.a,{}))):p.a.createElement(j.a,{ref:this.setRef,label:c},Object(r.a)(O.a,{icon:"list-ul",active:i,title:c,onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:o,multiColumn:s},void 0,Object(r.a)("div",{className:"column-header__links"},void 0,Object(r.a)("button",{className:"text-btn column-header__setting-btn",tabIndex:"0",onClick:this.handleEditClick},void 0,Object(r.a)("i",{className:"fa fa-pencil"})," ",Object(r.a)(v.b,{id:"lists.edit",defaultMessage:"Edit list"})),Object(r.a)("button",{className:"text-btn column-header__setting-btn",tabIndex:"0",onClick:this.handleDeleteClick},void 0,Object(r.a)("i",{className:"fa fa-trash"})," ",Object(r.a)(v.b,{id:"lists.delete",defaultMessage:"Delete list"}))),void 0!==d&&Object(r.a)("div",{},void 0,Object(r.a)("div",{className:"column-settings__row"},void 0,Object(r.a)("fieldset",{},void 0,Object(r.a)("legend",{},void 0,Object(r.a)(v.b,{id:"lists.replies_policy.title",defaultMessage:"Show replies to:"})),["no_replies","list_replies","all_replies"].map(function(e){return Object(r.a)("div",{className:"setting-radio"},void 0,Object(r.a)("input",{className:"setting-radio__input",id:["setting","radio",n,e].join("-"),type:"radio",value:e,checked:d===e,onChange:t.handleRepliesPolicyChange}),Object(r.a)("label",{className:"setting-radio__label",htmlFor:["setting","radio",n,e].join("-")},void 0,p.a.createElement(v.b,k[e])))})))),Object(r.a)("hr",{})),Object(r.a)(m.a,{trackScroll:!o,scrollKey:"list_timeline-"+a,timelineId:"list:"+n,onLoadMore:this.handleLoadMore,emptyMessage:Object(r.a)(v.b,{id:"empty_column.list",defaultMessage:"There is nothing in this list yet."})}))},e}(p.a.PureComponent),Object(c.a)(s,"contextTypes",{router:h.a.object}),a=l))||a)||a}}]);
//# sourceMappingURL=list_timeline.js.map