var j=Object.defineProperty;var C=(n,o,t)=>o in n?j(n,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[o]=t;var r=(n,o,t)=>C(n,typeof o!="symbol"?o+"":o,t);import{j as i}from"./client-By3tlFYA.js";import{r as g}from"./index-TEHZzOO_.js";import{H as L}from"./Helmet-BG0DmkIY.js";import{w as M,L as I}from"./short_number-C9zm8Jg6.js";import{j as S,ag as b,d1 as v,d2 as T,dF as h,dG as p,am as _,L as y,a5 as u}from"./useSelectableClick-BzXvq5NU.js";import{S as E}from"./delete-hKiDvgko.js";import{S as k}from"./edit-D0aVSJLs.js";import{S as D}from"./list_alt-DxJSZxN2.js";import{f}from"./streaming-CGaCTmgt.js";import{C as x}from"./column-KuFpKGtG.js";import{C as N}from"./column_header-DDqk2hxL.js";import{B as P}from"./bundle_column_error-NZbsxKdn.js";import{S as R}from"./status_list_container-D4turpNT.js";import{M as d}from"./message-CVkQtbZv.js";import"./numbers-BLyy7tyF.js";import"./index-DkCxcZFY.js";import"./relative_timestamp-BOUL06oe.js";import"./ready-DpOgoWSg.js";import"./index-DUY7J2K7.js";import"./skeleton-CwYXpOUk.js";import"./api-C8Dh2R2O.js";import"./index-DiPYjm3h.js";import"./load_locale-8zmaLnHA.js";import"./scroll-BygYx8ga.js";import"./add-CxOAEcXl.js";import"./chevron_left-tY77j9LU.js";import"./unfold_more-Dg1Ay52N.js";import"./status_quoted-BhuKT1D-.js";import"./gif-AtdwBGzp.js";import"./status_list-BVwH8zTU.js";import"./info-onfAZF3m.js";import"./follow_button-CCzqYaZZ.js";import"./verified_badge-YhwgfnSZ.js";import"./load_gap-BJ5dG7tg.js";import"./scrollable_list-PEuJxL2C.js";import"./index-DM_-Fo9k.js";import"./scroll_context-DvLTq0a0.js";import"./schedule_idle_task-CDh0madc.js";import"./load_more-D16l4yj0.js";const H=(n,o)=>({list:n.getIn(["lists",o.params.id]),hasUnread:n.getIn(["timelines","list:".concat(o.params.id),"unread"])>0});class w extends g.PureComponent{constructor(){super(...arguments);r(this,"handlePin",()=>{const{columnId:t,dispatch:s}=this.props;t?s(b(t)):(s(v("LIST",{id:this.props.params.id})),this.props.history.push("/"))});r(this,"handleMove",t=>{const{columnId:s,dispatch:e}=this.props;e(T(s,t))});r(this,"handleHeaderClick",()=>{this.column.scrollTop()});r(this,"setRef",t=>{this.column=t});r(this,"handleLoadMore",t=>{const{id:s}=this.props.params;this.props.dispatch(p(s,{maxId:t}))});r(this,"handleDeleteClick",()=>{const{dispatch:t,columnId:s}=this.props,{id:e}=this.props.params;t(_({modalType:"CONFIRM_DELETE_LIST",modalProps:{listId:e,columnId:s}}))})}componentDidMount(){const{dispatch:t}=this.props,{id:s}=this.props.params;t(h(s)),t(p(s)),this.disconnect=t(f(s))}UNSAFE_componentWillReceiveProps(t){const{dispatch:s}=this.props,{id:e}=t.params;e!==this.props.params.id&&(this.disconnect&&(this.disconnect(),this.disconnect=null),s(h(e)),s(p(e)),this.disconnect=s(f(e)))}componentWillUnmount(){this.disconnect&&(this.disconnect(),this.disconnect=null)}render(){const{hasUnread:t,columnId:s,multiColumn:e,list:a}=this.props,{id:l}=this.props.params,c=!!s,m=a?a.get("title"):l;return typeof a>"u"?i.jsx(x,{children:i.jsx("div",{className:"scrollable",children:i.jsx(y,{})})}):a===!1?i.jsx(P,{multiColumn:e,errorType:"routing"}):i.jsxs(x,{bindToDocument:!e,ref:this.setRef,label:m,children:[i.jsx(N,{icon:"list-ul",iconComponent:D,active:t,title:m,onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:c,multiColumn:e,children:i.jsx("div",{className:"column-settings",children:i.jsxs("section",{className:"column-header__links",children:[i.jsxs(I,{to:"/lists/".concat(l,"/edit"),className:"text-btn column-header__setting-btn",children:[i.jsx(u,{id:"pencil",icon:k})," ",i.jsx(d,{id:"lists.edit",defaultMessage:"Edit list"})]}),i.jsxs("button",{type:"button",className:"text-btn column-header__setting-btn",tabIndex:0,onClick:this.handleDeleteClick,children:[i.jsx(u,{id:"trash",icon:E})," ",i.jsx(d,{id:"lists.delete",defaultMessage:"Delete list"})]})]})})}),i.jsx(R,{trackScroll:!c,scrollKey:"list_timeline-".concat(s),timelineId:"list:".concat(l),onLoadMore:this.handleLoadMore,emptyMessage:i.jsx(d,{id:"empty_column.list",defaultMessage:"There is nothing in this list yet. When members of this list post new statuses, they will appear here."}),bindToDocument:!e}),i.jsxs(L,{children:[i.jsx("title",{children:m}),i.jsx("meta",{name:"robots",content:"noindex"})]})]})}}const St=M(S(H)(w));export{St as default};
//# sourceMappingURL=list_timeline-index-D2Ts955c.js.map
