(window.webpackJsonp=window.webpackJsonp||[]).push([[65],{663:function(e,t,a){"use strict";a.r(t),a.d(t,"default",function(){return N});var i,s,l,r=a(1),n=a(7),c=a(0),o=a(2),d=a(3),p=a.n(d),b=a(20),u=a(5),j=a.n(u),O=a(626),h=a(430),m=a(428),f=a(206),v=a(6),g=a(401),_=a(32),y=a(30),M=a(45),C=a(907),I=a(290),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"])}})(i=Object(v.g)((l=s=function(i){function e(){for(var l,e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return l=i.call.apply(i,[this].concat(t))||this,Object(o.a)(Object(c.a)(Object(c.a)(l)),"handlePin",function(){var e=l.props,t=e.columnId,a=e.dispatch;t?a(Object(f.h)(t)):(a(Object(f.e)("LIST",{id:l.props.params.id})),l.context.router.history.push("/"))}),Object(o.a)(Object(c.a)(Object(c.a)(l)),"handleMove",function(e){var t=l.props,a=t.columnId;(0,t.dispatch)(Object(f.g)(a,e))}),Object(o.a)(Object(c.a)(Object(c.a)(l)),"handleHeaderClick",function(){l.column.scrollTop()}),Object(o.a)(Object(c.a)(Object(c.a)(l)),"setRef",function(e){l.column=e}),Object(o.a)(Object(c.a)(Object(c.a)(l)),"handleLoadMore",function(e){var t=l.props.params.id;l.props.dispatch(Object(_.s)(t,{maxId:e}))}),Object(o.a)(Object(c.a)(Object(c.a)(l)),"handleEditClick",function(){l.props.dispatch(Object(M.d)("LIST_EDITOR",{listId:l.props.params.id}))}),Object(o.a)(Object(c.a)(Object(c.a)(l)),"handleDeleteClick",function(){var e=l.props,t=e.dispatch,a=e.columnId,i=e.intl,s=l.props.params.id;t(Object(M.d)("CONFIRM",{message:i.formatMessage(k.deleteMessage),confirm:i.formatMessage(k.deleteConfirm),onConfirm:function(){t(Object(y.F)(s)),a?t(Object(f.h)(a)):l.context.router.history.push("/lists")}}))}),Object(o.a)(Object(c.a)(Object(c.a)(l)),"handleRepliesPolicyChange",function(e){var t=e.target,a=l.props,i=(a.dispatch,a.list,l.props.params.id);l.props.dispatch(Object(y.Q)(i,void 0,!1,t.value))}),l}Object(n.a)(e,i);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(_.s)(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,a=e.hasUnread,i=e.columnId,s=e.multiColumn,l=e.list,n=(e.intl,this.props.params.id),c=!!i,o=l?l.get("title"):n,d=l?l.get("replies_policy"):void 0;return void 0===l?Object(r.a)(h.a,{},void 0,Object(r.a)("div",{className:"scrollable"},void 0,Object(r.a)(I.a,{}))):!1===l?Object(r.a)(h.a,{},void 0,Object(r.a)("div",{className:"scrollable"},void 0,Object(r.a)(C.a,{}))):p.a.createElement(h.a,{ref:this.setRef,label:o},Object(r.a)(m.a,{icon:"list-ul",active:a,title:o,onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:c,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)(O.a,{trackScroll:!c,scrollKey:"list_timeline-"+i,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(o.a)(s,"contextTypes",{router:j.a.object}),i=l))||i)||i}}]);
//# sourceMappingURL=list_timeline.js.map