import{d as e}from"./objectSpread2-DtFdQpqy.js";import{a as t,n}from"./preload-helper-EQ20WQt-.js";import{c as r,l as i,o as a}from"./prop-types-DdDwMzX7.js";import{_ as o}from"./poll-BqfIhRzt.js";import{Bt as s,Do as c,Eo as l,Ht as u,Ut as d,at as f,ot as p}from"./time-BE5vfriQ.js";import{t as m}from"./helmet-xJbX5x_5.js";import{t as h}from"./column-CvSGioVA.js";import{m as g}from"./navigation_panel-B8YiO3lX.js";import{a as _}from"./columns_area-LrSu9T_Q.js";import{t as v}from"./status_list-ChvZJWS3.js";var y=e(t()),b=n(),x=r({heading:{id:`column.bookmarks`,defaultMessage:`Bookmarks`}}),S=({columnId:e,multiColumn:t})=>{let n=i(),r=l(),S=(0,y.useRef)(null),C=c(e=>o(e,`bookmarks`)),w=c(e=>e.status_lists.getIn([`bookmarks`,`isLoading`],!0)),T=c(e=>!!e.status_lists.getIn([`bookmarks`,`next`]));(0,y.useEffect)(()=>{r(p())},[r]);let E=(0,y.useCallback)(()=>{r(e?d(e):s(`BOOKMARKS`,{}))},[r,e]),D=(0,y.useCallback)(t=>{r(u(e,t))},[r,e]),O=(0,y.useCallback)(()=>{var e;(e=S.current)==null||e.scrollTop()},[]),k=(0,y.useCallback)(()=>{r(f())},[r]),A=!!e,j=(0,b.jsx)(a,{id:`empty_column.bookmarked_statuses`,defaultMessage:`You don't have any bookmarked posts yet. When you bookmark one, it will show up here.`});return(0,b.jsxs)(h,{bindToDocument:!t,ref:S,label:n.formatMessage(x.heading),children:[(0,b.jsx)(_,{icon:`bookmarks`,iconComponent:g,title:n.formatMessage(x.heading),onPin:E,onMove:D,onClick:O,pinned:A,multiColumn:t}),(0,b.jsx)(v,{trackScroll:!A,statusIds:C,scrollKey:`bookmarked_statuses-${e}`,hasMore:T,isLoading:w,onLoadMore:k,emptyMessage:j,bindToDocument:!t,timelineId:`bookmarks`}),(0,b.jsxs)(m,{children:[(0,b.jsx)(`title`,{children:n.formatMessage(x.heading)}),(0,b.jsx)(`meta`,{name:`robots`,content:`noindex`})]})]})};export{S as default};
//# sourceMappingURL=bookmarked_statuses-GI3LMPTK.js.map