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]=`0e7a21ea-29fa-481e-bf09-c5f6fa3d715e`,e._sentryDebugIdIdentifier=`sentry-dbid-0e7a21ea-29fa-481e-bf09-c5f6fa3d715e`)}catch{}import"./rolldown-runtime-nx40z1zs.js";import{Ag as e,Oi as t,Qh as n,Zm as r,_r as i,ei as a,ng as o,op as s}from"./entry.client-mpghtlrl.js";import{S as c,T as l,x as u}from"./xds-react-components-ihgca01z.js";import{L as d,R as f}from"./xds-icons-m106f2fc.js";import{t as p}from"./guideRouterEnvironmentHooks-h2xlfina.js";import{t as m}from"./useGuideStrings-n4ehuf4q.js";import{t as h}from"./useGuideTearOff-cgtlkksg.js";import{t as g}from"./WidgetInteractable-mzv6xcil.js";import{t as _}from"./useChatStrings-f6vrmnim.js";import{t as v}from"./GuidePageLayout-eh7novzv.js";import{n as y,t as b}from"./GuideL1Header-jicu0pye.js";import{t as x}from"./ConversationsList-mdrouoa8.js";var S=e(),C=o(),w=e=>{let t=(0,S.c)(32),{className:n,unreadRequestCount:r,onNewChat:i,onOpenChatRequests:o,newChatItemProps:s,chatRequestsItemProps:p}=e,{locNewChat:m,locChatRequests:h}=_(),v;t[0]===m?v=t[1]:(v=m(),t[0]=m,t[1]=v);let y;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,C.jsx)(d,{}),t[2]=y):y=t[2];let b=s?void 0:i,x;t[3]!==v||t[4]!==b?(x=(0,C.jsx)(u,{as:`button`,label1:v,leadingIcon:y,onPress:b}),t[3]=v,t[4]=b,t[5]=x):x=t[5];let w;t[6]!==s||t[7]!==x?(w=(0,C.jsx)(`div`,{className:`flex-grow`,children:(0,C.jsx)(g,{asChild:!0,...s,children:x})}),t[6]=s,t[7]=x,t[8]=w):w=t[8];let T;t[9]===h?T=t[10]:(T=h(),t[9]=h,t[10]=T);let E;t[11]===h?E=t[12]:(E=h(),t[11]=h,t[12]=E);let D=p?void 0:o,O;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,C.jsx)(`div`,{className:`m-[4px]`,children:(0,C.jsx)(a,{icon:(0,C.jsx)(f,{}),size:`subtitle2`})}),t[13]=O):O=t[13];let k;t[14]===r?k=t[15]:(k=r>0&&(0,C.jsx)(`div`,{className:`absolute end-0 top-0`,children:(0,C.jsx)(c,{kind:`brand`})}),t[14]=r,t[15]=k);let A;t[16]===k?A=t[17]:(A=(0,C.jsx)(l.LeadingIcon,{children:(0,C.jsx)(`div`,{className:`flex w-full flex-col items-center`,children:(0,C.jsxs)(`div`,{className:`relative m-[-4px]`,children:[O,k]})})}),t[16]=k,t[17]=A);let j;t[18]!==T||t[19]!==E||t[20]!==D||t[21]!==A?(j=(0,C.jsx)(l,{className:`min-w-items-notification-split-action-button-width !gap-0`,as:`button`,"aria-label":T,tooltipContent:E,onPress:D,children:A}),t[18]=T,t[19]=E,t[20]=D,t[21]=A,t[22]=j):j=t[22];let M;t[23]!==p||t[24]!==j?(M=(0,C.jsx)(`div`,{children:(0,C.jsx)(g,{asChild:!0,...p,children:j})}),t[23]=p,t[24]=j,t[25]=M):M=t[25];let N;t[26]!==w||t[27]!==M?(N=(0,C.jsxs)(`div`,{className:`gap-items-social-related-spacing-horizontal-alignment-graphic-&-text flex flex-row`,children:[w,M]}),t[26]=w,t[27]=M,t[28]=N):N=t[28];let P;return t[29]!==n||t[30]!==N?(P=(0,C.jsx)(`section`,{className:n,children:N}),t[29]=n,t[30]=N,t[31]=P):P=t[31],P},T=i(w,({...e})=>{let{messagingInbox:t}=r(),{data:i}=n(t.queries.messageRequestCount.getActiveUserQuery().getOptions()),a=p(),{getItemProps:o}=h({navigate:a,getNavigateOptions:e=>e===`newChat`?{to:s.dialog.guide.chat.inviteToChat.fullPath,params:{groupId:`new`}}:{to:s.dialog.guide.chat.requests.fullPath}});return{unreadRequestCount:i?.unread??0,onNewChat:()=>{a({to:s.dialog.guide.chat.inviteToChat.fullPath,params:{groupId:`new`}})},onOpenChatRequests:()=>{a({to:s.dialog.guide.chat.requests.fullPath})},newChatItemProps:o(`newChat`),chatRequestsItemProps:o(`chatRequests`),...e}}),E=t(({...e})=>(0,C.jsx)(T.useComponent(),{...e}),`ChatLandingHeader`),D=t(()=>{let{locChat:e}=m();return(0,C.jsx)(v,{id:`guide-chat-landing-page`,header:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`div`,{className:`flex items-center gap-internal-gap-tight`,children:[(0,C.jsx)(y,{}),(0,C.jsx)(b,{title:e(),className:`flex-1`})]}),(0,C.jsx)(E,{})]}),contentClassName:`gap-layout-vertical-related-content-in-a-section-tight`,children:(0,C.jsx)(x,{inboxType:`primary`})})},`ChatLandingPage`);export{D as ChatLandingPage,D as default,w as t};