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]=`14803631-18a3-4cdc-9a07-79422ea0643e`,e._sentryDebugIdIdentifier=`sentry-dbid-14803631-18a3-4cdc-9a07-79422ea0643e`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{Dg as t,Fg as n,Hf as r,Ig as i,ch as a,sh as o,wg as s,zp as c}from"./entry.client-dr7r6s9a.js";import{t as l}from"./guideRouterEnvironmentHooks-gdtmgzra.js";var u=n(),d=e(i(),1),f=()=>{let e=(0,u.c)(17),{conversation:n}=o(),i=l(),f;e[0]===n.mutations.createGroup?f=e[1]:(f=n.mutations.createGroup.getActiveUserMutation().getOptions(),e[0]=n.mutations.createGroup,e[1]=f);let{mutate:m}=s(f),[h,g]=(0,d.useState)(),[_,v]=(0,d.useState)(),y;e[2]!==h||e[3]!==n?(y=h?n.queries.groupByClientId.getActiveUserQuery().getOptions({clientId:h}):{queryFn:p,queryKey:[],enabled:!1},e[2]=h,e[3]=n,e[4]=y):y=e[4];let{data:b}=t(y),x=b?.groupId,S,C;e[5]!==x||e[6]!==i||e[7]!==_?(S=()=>{x&&(i({to:c.dialog.guide.chat.groupChat.fullPath,params:{groupId:x},..._}),v(void 0),g(void 0))},C=[x,i,_],e[5]=x,e[6]=i,e[7]=_,e[8]=S,e[9]=C):(S=e[8],C=e[9]),(0,d.useEffect)(S,C);let{trackUserAction:w}=a(),T;e[10]===w?T=e[11]:(T=(e,t,n)=>{w(`ChatInteractionWithCount`,{type:e,wasSuccessful:t,count:n},`Press`)},e[10]=w,e[11]=T);let E=T,D;e[12]!==m||e[13]!==E?(D=(e,t)=>{let n=r();m({createdClientGroupId:n,xuids:e},{onSuccess:()=>{E(`CreateGroup`,!0,e.length),v(t),g(n)},onError:()=>E(`CreateGroup`,!1,e.length)})},e[12]=m,e[13]=E,e[14]=D):D=e[14];let O=D,k;return e[15]===O?k=e[16]:(k={createGroupAndNavigate:O},e[15]=O,e[16]=k),k};function p(){return null}export{f as t};