try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`d4b3c383-7c90-435c-a608-c51fc3b93dde`,e._sentryDebugIdIdentifier=`sentry-dbid-d4b3c383-7c90-435c-a608-c51fc3b93dde`)}catch{}import"./rolldown-runtime-eb2nym32.js";import{$ as e}from"./xds-react-components-lks62tbl.js";import{Ag as t,Dg as n,Fg as r,dn as i,mr as a,sh as o,wg as s}from"./entry.client-dr7r6s9a.js";import{t as c}from"./useChatStrings-ddn3ault.js";import{t as l}from"./GuidePageLayout-imh16gdu.js";import{t as u}from"./ConversationsList-og9inibv.js";import{t as d}from"./GuideL2Header-b90pi17a.js";var f=r(),p=t(),m=a(({conversationCount:t,unreadCount:n,markAllConversationsAsRead:r,deleteAllConversations:i})=>{let{locChatRequests:a,locDeleteAll:o,locMarkAllAsRead:s}=c();return(0,p.jsx)(l,{id:`guide-chat-requests`,header:(0,p.jsx)(d,{title:a(),moreMenuItems:t>0?(0,p.jsxs)(p.Fragment,{children:[n>0&&(0,p.jsx)(e,{id:`markAllAsRead`,label:s(),onClick:r}),(0,p.jsx)(e,{id:`deleteAll`,label:o(),onClick:i})]}):void 0}),children:(0,p.jsx)(u,{inboxType:`requests`})})},`ChatRequestsPage`),h=i(m,({...e})=>{let{messagingInbox:t}=o(),{data:r}=n(t.queries.messageRequestCount.getActiveUserQuery().getOptions()),{mutate:i}=s(t.mutations.markSecondaryFolderRead.getActiveUserMutation().getOptions()),{mutate:a}=s(t.mutations.deleteSecondaryFolderContents.getActiveUserMutation().getOptions());return{conversationCount:r?.total??0,unreadCount:r?.unread??0,markAllConversationsAsRead:i,deleteAllConversations:a,...e}}),g=e=>{let t=(0,f.c)(5),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r=h.useComponent(),i;return t[2]!==r||t[3]!==n?(i=(0,p.jsx)(r,{...n}),t[2]=r,t[3]=n,t[4]=i):i=t[4],i};export{g as ChatRequestsPage,g as default,h as ChatRequestsPageConnection,m as PureChatRequestsPage};