(window.webpackJsonp=window.webpackJsonp||[]).push([[50],{1033:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return y}));var s,i,c=a(0),d=(a(1),a(3)),o=a.n(d),n=a(16),l=a.n(n),r=a(12),u=a(18),p=a(4),b=a(25),m=a(39),j=a(32),v=a(20);const O=Object(p.f)({remove:{id:"lists.account.remove",defaultMessage:"Remove from list"},add:{id:"lists.account.add",defaultMessage:"Add to list"}});let _=Object(r.connect)(((e,t)=>{let{listId:a,added:s}=t;return{list:e.get("lists").get(a),added:void 0===s?e.getIn(["listAdder","lists","items"]).includes(a):s}}),((e,t)=>{let{listId:a}=t;return{onRemove:()=>e(Object(b.J)(a)),onAdd:()=>e(Object(b.A)(a))}}))(s=Object(p.g)(((i=class extends u.a{render(){const{list:e,intl:t,onRemove:a,onAdd:s,added:i}=this.props;let d;return d=i?Object(c.a)(j.a,{icon:"times",title:t.formatMessage(O.remove),onClick:a}):Object(c.a)(j.a,{icon:"plus",title:t.formatMessage(O.add),onClick:s}),Object(c.a)("div",{className:"list"},void 0,Object(c.a)("div",{className:"list__wrapper"},void 0,Object(c.a)("div",{className:"list__display-name"},void 0,Object(c.a)(v.a,{id:"list-ul",className:"column-link__icon",fixedWidth:!0}),e.get("title")),Object(c.a)("div",{className:"account__relationship"},void 0,d)))}}).propTypes={list:l.a.map.isRequired,intl:o.a.object.isRequired,onRemove:o.a.func.isRequired,onAdd:o.a.func.isRequired,added:o.a.bool},i.defaultProps={added:!1},s=i))||s)||s;var R,f,g=a(207),I=a(100),N=a(136);let q=Object(r.connect)((()=>{const e=Object(g.d)();return(t,a)=>{let{accountId:s}=a;return{account:e(t,s)}}}))(R=Object(p.g)(((f=class extends u.a{render(){const{account:e}=this.props;return Object(c.a)("div",{className:"account"},void 0,Object(c.a)("div",{className:"account__wrapper"},void 0,Object(c.a)("div",{className:"account__display-name"},void 0,Object(c.a)("div",{className:"account__avatar-wrapper"},void 0,Object(c.a)(I.a,{account:e,size:36})),Object(c.a)(N.a,{account:e}))))}}).propTypes={account:l.a.map.isRequired},R=f))||R)||R;var w,h,A=a(1446);const k=Object(m.a)([e=>e.get("lists")],(e=>e?e.toList().filter((e=>!!e)).sort(((e,t)=>e.get("title").localeCompare(t.get("title")))):e));let y=Object(r.connect)((e=>({listIds:k(e).map((e=>e.get("id")))})),(e=>({onInitialize:t=>e(Object(b.N)(t)),onReset:()=>e(Object(b.L)())})))(w=Object(p.g)(((h=class extends u.a{componentDidMount(){const{onInitialize:e,accountId:t}=this.props;e(t)}componentWillUnmount(){const{onReset:e}=this.props;e()}render(){const{accountId:e,listIds:t}=this.props;return Object(c.a)("div",{className:"modal-root__modal list-adder"},void 0,Object(c.a)("div",{className:"list-adder__account"},void 0,Object(c.a)(q,{accountId:e})),Object(c.a)(A.a,{}),Object(c.a)("div",{className:"list-adder__lists"},void 0,t.map((e=>Object(c.a)(_,{listId:e},e)))))}}).propTypes={accountId:o.a.string.isRequired,onClose:o.a.func.isRequired,intl:o.a.object.isRequired,onInitialize:o.a.func.isRequired,onReset:o.a.func.isRequired,listIds:l.a.list.isRequired},w=h))||w)||w}}]);
//# sourceMappingURL=list_adder-4e9c2984cc0c8eca684b.chunk.js.map