(window.webpackJsonp=window.webpackJsonp||[]).push([[78],{1102:function(e,t,o){"use strict";o.r(t),o.d(t,"default",(function(){return T}));var s,a,c=o(0),n=o(29),i=o.n(n),d=o(1),r=o.n(d),u=o(12),l=o(3),p=o.n(l),b=o(16),h=o.n(b),m=o(371),g=o(19),I=o(4),j=o(959),O=o(1292),f=o(1343),w=o(1346),M=o(18),_=o(1310),y=o(1295),L=o(1371),C=o(1372),k=o(143);const A=e=>{let{url:t}=e;return Object(c.a)(L.a,{url:t,resource:Object(c.a)(I.b,{id:"timeline_hint.resources.follows",defaultMessage:"Follows"})})};let T=Object(u.connect)(((e,t)=>{let{params:{acct:o,id:s}}=t;const a=s||e.getIn(["accounts_map",o]);return a?{accountId:a,remote:!(e.getIn(["accounts",a,"acct"])===e.getIn(["accounts",a,"username"])),remoteUrl:e.getIn(["accounts",a,"url"]),isAccount:!!e.getIn(["accounts",a]),accountIds:e.getIn(["user_lists","following",a,"items"]),hasMore:!!e.getIn(["user_lists","following",a,"next"]),isLoading:e.getIn(["user_lists","following",a,"isLoading"],!0),suspended:e.getIn(["accounts",a,"suspended"],!1),hidden:Object(k.b)(e,a)}:{isLoading:!0}}))(((a=class extends M.a{constructor(){super(...arguments),this.handleLoadMore=i()((()=>{this.props.dispatch(Object(g.V)(this.props.accountId))}),300,{leading:!0}),this.setRef=e=>{this.column=e},this.handleHeaderClick=()=>{this.column.scrollTop()}}_load(){const{accountId:e,isAccount:t,dispatch:o}=this.props;t||o(Object(g.W)(e)),o(Object(g.Z)(e))}componentDidMount(){const{params:{acct:e},accountId:t,dispatch:o}=this.props;t?this._load():o(Object(g.eb)(e))}componentDidUpdate(e){const{params:{acct:t},accountId:o,dispatch:s}=this.props;e.accountId!==o&&o?this._load():e.params.acct!==t&&s(Object(g.eb)(t))}render(){const{accountId:e,accountIds:t,hasMore:o,isAccount:s,multiColumn:a,isLoading:n,suspended:i,hidden:d,remote:u,remoteUrl:l}=this.props;if(!s)return Object(c.a)(O.a,{},void 0,Object(c.a)(_.a,{}));if(!t)return Object(c.a)(O.a,{},void 0,Object(c.a)(m.b,{}));let p;const b=i||d;p=i?Object(c.a)(I.b,{id:"empty_column.account_suspended",defaultMessage:"Account suspended"}):d?Object(c.a)(C.a,{accountId:e}):u&&t.isEmpty()?Object(c.a)(A,{url:l}):Object(c.a)(I.b,{id:"account.follows.empty",defaultMessage:"This user doesn't follow anyone yet."});const h=u?Object(c.a)(A,{url:l}):null;return r.a.createElement(O.a,{ref:this.setRef},Object(c.a)(f.a,{onClick:this.handleHeaderClick,multiColumn:a}),Object(c.a)(y.a,{scrollKey:"following",hasMore:!b&&o,isLoading:n,onLoadMore:this.handleLoadMore,prepend:Object(c.a)(w.a,{accountId:this.props.accountId,hideTabs:!0}),alwaysPrepend:!0,append:h,emptyMessage:p,bindToDocument:!a},void 0,t.map((e=>Object(c.a)(j.a,{id:e,withNote:!1},e)))))}}).propTypes={params:p.a.shape({acct:p.a.string,id:p.a.string}).isRequired,accountId:p.a.string,dispatch:p.a.func.isRequired,accountIds:h.a.list,hasMore:p.a.bool,isLoading:p.a.bool,isAccount:p.a.bool,suspended:p.a.bool,hidden:p.a.bool,remote:p.a.bool,remoteUrl:p.a.string,multiColumn:p.a.bool},s=a))||s}}]);
//# sourceMappingURL=following-5ccb8f83348a469e0560.chunk.js.map