import{j as t}from"./client-By3tlFYA.js";import{u as y,r as c,a as L,d as v}from"./index-TEHZzOO_.js";import{H as k}from"./Helmet-BG0DmkIY.js";import{u as C,h as S,a as i,d8 as E,e5 as p,L as N,a5 as Q}from"./useSelectableClick-BxxGQli3.js";import{S as R}from"./refresh-BrzXIPps.js";import{C as B}from"./column_header-DvgirlnX.js";import{S as D}from"./status_list-CRbe6f7w.js";import{C as g}from"./column-D8q25PWW.js";import{M as h}from"./message-CVkQtbZv.js";import"./short_number-C9zm8Jg6.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-CF-OtRm0.js";import"./add-CxOAEcXl.js";import"./chevron_left-tY77j9LU.js";import"./unfold_more-Dg1Ay52N.js";import"./gif-9qak4M3X.js";import"./info-onfAZF3m.js";import"./follow_button-4kk1eVh_.js";import"./status_quoted-B4XDAzAW.js";import"./verified_badge-CALr0BmE.js";import"./load_gap-CrijTKMD.js";import"./scrollable_list-C9ToIjEA.js";import"./index-Cug8L038.js";import"./scroll_context-CaPHRejF.js";import"./schedule_idle_task-CDh0madc.js";import"./load_more-BrYvOBz8.js";import"./scroll-BygYx8ga.js";const j=L({refresh:{id:"refresh",defaultMessage:"Refresh"}}),H=E(),jt=({multiColumn:m,params:u})=>{const f=y(),o=C(),e=u==null?void 0:u.statusId,{accountId:I}=S(),d=i(s=>s.status_lists.getIn(["quotes","statusId"])===e),l=i(s=>s.statuses.getIn([e,"account"])),r=i(s=>l?s.accounts.get(l):void 0),x=i(s=>s.status_lists.getIn(["quotes","items"],H)),a=i(s=>s.status_lists.getIn(["quotes","next"])),M=i(s=>s.status_lists.getIn(["quotes","isLoading"],!0)),_=!!a;c.useEffect(()=>{e&&o(p({statusId:e}))},[o,e]);const b=c.useCallback(()=>{e&&d&&a&&o(p({statusId:e,next:a}))},[o,e,d,a]),q=c.useCallback(()=>{e&&o(p({statusId:e}))},[o,e]);if(!x||!d)return t.jsx(g,{children:t.jsx(N,{})});const w=t.jsx(h,{id:"status.quotes.empty",defaultMessage:"No one has quoted this post yet. When someone does, it will show up here."});let n;return I===l?n=null:(r==null?void 0:r.username)===(r==null?void 0:r.acct)?n=t.jsx("div",{className:"follow_requests-unlocked_explanation",children:t.jsx(h,{id:"status.quotes.local_other_disclaimer",defaultMessage:"Quotes rejected by the author will not be shown."})}):n=t.jsx("div",{className:"follow_requests-unlocked_explanation",children:t.jsx(h,{id:"status.quotes.remote_other_disclaimer",defaultMessage:"Only quotes from {domain} are guaranteed to be shown here. Quotes rejected by the author will not be shown.",values:{domain:t.jsx("strong",{children:v})}})}),t.jsxs(g,{bindToDocument:!m,children:[t.jsx(B,{showBackButton:!0,multiColumn:m,extraButton:t.jsx("button",{type:"button",className:"column-header__button",title:f.formatMessage(j.refresh),"aria-label":f.formatMessage(j.refresh),onClick:q,children:t.jsx(Q,{id:"refresh",icon:R})})}),t.jsx(D,{scrollKey:"quotes_timeline",statusIds:x,onLoadMore:b,hasMore:_,isLoading:M,emptyMessage:w,bindToDocument:!m,prepend:n}),t.jsx(k,{children:t.jsx("meta",{name:"robots",content:"noindex"})})]})};export{jt as Quotes,jt as default};
//# sourceMappingURL=quotes-index-BPLjYjFe.js.map
