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]=`0c72015e-4b2b-4bea-aa7c-8e163deda886`,e._sentryDebugIdIdentifier=`sentry-dbid-0c72015e-4b2b-4bea-aa7c-8e163deda886`)}catch{}import"./rolldown-runtime-nx40z1zs.js";import{Ag as e,Oi as t,Qh as n,Yh as r,Zm as i,_r as a,ng as o}from"./entry.client-mpghtlrl.js";import{it as s}from"./xds-react-components-ihgca01z.js";import{t as c}from"./useChatStrings-f6vrmnim.js";import{t as l}from"./GuidePageLayout-eh7novzv.js";import{t as u}from"./ConversationsList-mdrouoa8.js";import{t as d}from"./GuideL2Header-a2pogkf0.js";var f=e(),p=o(),m=t(({conversationCount:e,unreadCount:t,markAllConversationsAsRead:n,deleteAllConversations:r})=>{let{locChatRequests:i,locDeleteAll:a,locMarkAllAsRead:o}=c();return(0,p.jsx)(l,{id:`guide-chat-requests`,header:(0,p.jsx)(d,{title:i(),moreMenuItems:e>0?(0,p.jsxs)(p.Fragment,{children:[t>0&&(0,p.jsx)(s,{id:`markAllAsRead`,label:o(),onClick:n}),(0,p.jsx)(s,{id:`deleteAll`,label:a(),onClick:r})]}):void 0}),children:(0,p.jsx)(u,{inboxType:`requests`})})},`ChatRequestsPage`),h=a(m,({...e})=>{let{messagingInbox:t}=i(),{data:a}=n(t.queries.messageRequestCount.getActiveUserQuery().getOptions()),{mutate:o}=r(t.mutations.markSecondaryFolderRead.getActiveUserMutation().getOptions()),{mutate:s}=r(t.mutations.deleteSecondaryFolderContents.getActiveUserMutation().getOptions());return{conversationCount:a?.total??0,unreadCount:a?.unread??0,markAllConversationsAsRead:o,deleteAllConversations:s,...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};