var b=Object.defineProperty;var h=(o,s,t)=>s in o?b(o,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[s]=t;var r=(o,s,t)=>h(o,typeof s!="symbol"?s+"":s,t);import{j as e}from"./client-By3tlFYA.js";import{P as i}from"./short_number-C9zm8Jg6.js";import{i as g,a as f}from"./index-TEHZzOO_.js";import{j as M,p as k,q as x,eb as j,z as I,ec as L,L as y}from"./useSelectableClick-D9BFU7v4.js";import{S}from"./block-fill-d1A1-8Di.js";import{A as B}from"./index-0ULFNBLJ.js";import{S as C}from"./scrollable_list-b0C3wAAH.js";import{C as p}from"./column-BaxhIcvj.js";import{M as T}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-Dm9dKbU7.js";import"./status_quoted-Cw_rzNHJ.js";import"./counters-O2iLRFgv.js";import"./follow_button-BZib-IuX.js";import"./verified_badge-CnDAo1Ce.js";import"./index-CdcXssN4.js";import"./scroll_context-mV8SlNiP.js";import"./schedule_idle_task-CDh0madc.js";import"./load_more-CRfza3T3.js";import"./column_header-B74GfnnV.js";import"./add-CxOAEcXl.js";import"./chevron_left-tY77j9LU.js";import"./unfold_more-Dg1Ay52N.js";import"./scroll-BygYx8ga.js";const _=f({heading:{id:"column.blocks",defaultMessage:"Blocked users"}}),P=o=>({accountIds:o.getIn(["user_lists","blocks","items"]),hasMore:!!o.getIn(["user_lists","blocks","next"]),isLoading:o.getIn(["user_lists","blocks","isLoading"],!0)});class c extends k{constructor(){super(...arguments);r(this,"handleLoadMore",I(()=>{this.props.dispatch(L())},300,{leading:!0}))}UNSAFE_componentWillMount(){this.props.dispatch(j())}render(){const{intl:t,accountIds:a,hasMore:l,multiColumn:n,isLoading:d}=this.props;if(!a)return e.jsx(p,{children:e.jsx(y,{})});const u=e.jsx(T,{id:"empty_column.blocks",defaultMessage:"You haven't blocked any users yet."});return e.jsx(p,{bindToDocument:!n,icon:"ban",iconComponent:S,heading:t.formatMessage(_.heading),alwaysShowBackButton:!0,children:e.jsx(C,{scrollKey:"blocks",onLoadMore:this.handleLoadMore,hasMore:l,isLoading:d,emptyMessage:u,bindToDocument:!n,children:a.map(m=>e.jsx(B,{id:m,defaultAction:"block"},m))})})}}r(c,"propTypes",{params:i.object.isRequired,dispatch:i.func.isRequired,accountIds:x.list,hasMore:i.bool,isLoading:i.bool,intl:i.object.isRequired,multiColumn:i.bool});const po=M(P)(g(c));export{po as default};
//# sourceMappingURL=blocks-index-DkuTyqPf.js.map
