(window.webpackJsonp=window.webpackJsonp||[]).push([[44],{1131:function(e,o,t){"use strict";t.r(o),t.d(o,"default",(function(){return R}));var a,s,c=t(0),i=t(1),n=t.n(i),l=t(3),d=t.n(l),r=t(18),u=t(16),b=t.n(u),p=t(12),g=t(4),m=t(396),f=t(83),j=t(58),O=t(41),h=t(1292),v=t(143),w=t(226),_=t(236),y=t(468),k=t(45),N=t(19);const M=Object(g.f)({follow:{id:"account.follow",defaultMessage:"Follow"},unfollow:{id:"account.unfollow",defaultMessage:"Unfollow"}});let x=Object(p.connect)((()=>{const e=Object(v.e)();return(o,t)=>({account:e(o,t.id)})}))(a=Object(g.g)(((s=class extends r.a{constructor(){super(...arguments),this.handleFollow=()=>{const{account:e,dispatch:o}=this.props;e.getIn(["relationship","following"])||e.getIn(["relationship","requested"])?o(Object(N.lb)(e.get("id"))):o(Object(N.db)(e.get("id")))}}render(){const{account:e,intl:o}=this.props;let t;return t=e.getIn(["relationship","following"])?Object(c.a)(k.a,{icon:"check",title:o.formatMessage(M.unfollow),active:!0,onClick:this.handleFollow}):Object(c.a)(k.a,{icon:"plus",title:o.formatMessage(M.follow),onClick:this.handleFollow}),Object(c.a)("div",{className:"account follow-recommendations-account"},void 0,Object(c.a)("div",{className:"account__wrapper"},void 0,Object(c.a)(y.a,{className:"account__display-name account__display-name--with-note",title:e.get("acct"),href:e.get("url"),to:"/@"+e.get("acct")},void 0,Object(c.a)("div",{className:"account__avatar-wrapper"},void 0,Object(c.a)(w.a,{account:e,size:36})),Object(c.a)(_.a,{account:e}),Object(c.a)("div",{className:"account__note"},void 0,e.get("note_plain").split(/(([\.\?!]+\s)|[．。？！\n•])/)[0])),Object(c.a)("div",{className:"account__relationship"},void 0,t)))}}).propTypes={account:b.a.map.isRequired,intl:d.a.object.isRequired,dispatch:d.a.func.isRequired},a=s))||a)||a;var q,D,F=()=>Object(c.a)("svg",{viewBox:"0 0 216.4144 232.00976",className:"logo"},void 0,Object(c.a)("use",{xlinkHref:"#mastodon-svg-logo"})),I=t(145),L=t(87);let R=Object(p.connect)((e=>({suggestions:e.getIn(["suggestions","items"]),isLoading:e.getIn(["suggestions","isLoading"])})))(((D=class extends r.a{constructor(){super(...arguments),this.handleDone=()=>{const{dispatch:e}=this.props,{router:o}=this.context;e(Object(j.E)((o=>{"granted"===o&&(e(Object(f.c)(["notifications","alerts","follow"],!0)),e(Object(f.c)(["notifications","alerts","favourite"],!0)),e(Object(f.c)(["notifications","alerts","reblog"],!0)),e(Object(f.c)(["notifications","alerts","mention"],!0)),e(Object(f.c)(["notifications","alerts","poll"],!0)),e(Object(f.c)(["notifications","alerts","status"],!0)),e(Object(f.d)()))}))),o.history.push("/home")}}componentDidMount(){const{dispatch:e,suggestions:o}=this.props;0===o.size&&e(Object(m.f)(!0))}componentWillUnmount(){const{dispatch:e}=this.props;e(Object(O.D)("home"))}render(){const{suggestions:e,isLoading:o}=this.props;return Object(c.a)(h.a,{},void 0,Object(c.a)("div",{className:"scrollable follow-recommendations-container"},void 0,Object(c.a)("div",{className:"column-title"},void 0,Object(c.a)(F,{}),Object(c.a)("h3",{},void 0,Object(c.a)(g.b,{id:"follow_recommendations.heading",defaultMessage:"Follow people you'd like to see posts from! Here are some suggestions."})),Object(c.a)("p",{},void 0,Object(c.a)(g.b,{id:"follow_recommendations.lead",defaultMessage:"Posts from people you follow will show up in chronological order on your home feed. Don't be afraid to make mistakes, you can unfollow people just as easily any time!"}))),!o&&Object(c.a)(n.a.Fragment,{},void 0,Object(c.a)("div",{className:"column-list"},void 0,e.size>0?e.map((e=>Object(c.a)(x,{id:e.get("account")},e.get("account")))):Object(c.a)("div",{className:"column-list__empty-message"},void 0,Object(c.a)(g.b,{id:"empty_column.follow_recommendations",defaultMessage:"Looks like no suggestions could be generated for you. You can try using search to look for people you might know or explore trending hashtags."}))),Object(c.a)("div",{className:"column-actions"},void 0,Object(c.a)("img",{src:I.default,alt:"",className:"column-actions__background"}),Object(c.a)(L.a,{onClick:this.handleDone},void 0,Object(c.a)(g.b,{id:"follow_recommendations.done",defaultMessage:"Done"}))))))}}).contextTypes={router:d.a.object.isRequired},D.propTypes={dispatch:d.a.func.isRequired,suggestions:b.a.list,isLoading:d.a.bool},q=D))||q},145:function(e,o,t){"use strict";t.r(o),o.default=t.p+"media/images/elephant_ui_greeting-530b368959aeb035f1ebb16fbc361c71.svg"}}]);
//# sourceMappingURL=follow_recommendations-0206ab42227df5f4d690.chunk.js.map