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]=`7527e200-e2f1-435b-9a8f-b3c55f26cb94`,e._sentryDebugIdIdentifier=`sentry-dbid-7527e200-e2f1-435b-9a8f-b3c55f26cb94`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{Ag as t,H as n,Oi as r,Qh as i,Qm as a,Yh as o,Zm as s,_r as c,jg as l,ng as u}from"./entry.client-mpghtlrl.js";import{n as d}from"./guideRouterEnvironmentHooks-h2xlfina.js";import{t as f}from"./useGuideStrings-n4ehuf4q.js";import{t as p}from"./GuidePageLayout-eh7novzv.js";import{t as m}from"./GuideL2Header-a2pogkf0.js";import{n as h,r as g,t as _}from"./GuideFriendsPicker-hl7nx5ln.js";var v=t(),y=e(l(),1),b=u(),x=e=>{let t=(0,v.c)(20),{isActiveParty:r,goBack:i,onSelect:a,disableButton:o}=e,{locAddPeople:s}=n(),{locSendInvitesCount:c}=f(),l,u;if(t[0]!==r||t[1]!==i?(l=()=>{r||i()},u=[r,i],t[0]=r,t[1]=i,t[2]=l,t[3]=u):(l=t[2],u=t[3]),(0,y.useEffect)(l,u),!r)return null;let d;t[4]===s?d=t[5]:(d=s(),t[4]=s,t[5]=d);let x;t[6]===d?x=t[7]:(x=(0,b.jsx)(m,{title:d}),t[6]=d,t[7]=x);let S;t[8]!==c||t[9]!==o?(S=(0,b.jsx)(_,{getSelectButtonLabel:c,disableButton:o}),t[8]=c,t[9]=o,t[10]=S):S=t[10];let C;t[11]!==x||t[12]!==S?(C=(0,b.jsxs)(`div`,{className:`flex flex-col gap-layout-vertical-title-and-row-regular`,children:[x,S]}),t[11]=x,t[12]=S,t[13]=C):C=t[13];let w;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,b.jsx)(h,{}),t[14]=w):w=t[14];let T;t[15]===C?T=t[16]:(T=(0,b.jsx)(p,{id:`guide-invite-to-party-page`,header:C,children:w}),t[15]=C,t[16]=T);let E;return t[17]!==a||t[18]!==T?(E=(0,b.jsx)(g,{onSelect:a,children:T}),t[17]=a,t[18]=T,t[19]=E):E=t[19],E},S=c(x,()=>{let{activeParty:e}=s(),{data:t}=i(e.queries.currentPartySession.getActiveUserQuery().getOptions()),{mutate:n}=o(e.mutations.inviteUsers.getActiveUserMutation().getOptions()),r=d(),{trackUserAction:c}=a(),[l,u]=(0,y.useState)(!1),f=e=>{c(`PartyInteraction`,{type:`InviteUsers`,wasSuccessful:e},`Press`)};return{isActiveParty:!!t,goBack:r,onSelect:e=>{u(!0),n(e.map(e=>e.xuid),{onSuccess:()=>f(!0),onError:()=>f(!1),onSettled:r})},disableButton:l}}),C=r(()=>(0,b.jsx)(S.useComponent(),{}),`InviteToPartyPage`);export{C as InviteToPartyPage,C as default,S as InviteToPartyPageConnection,x as PureInviteToPartyPage};