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]=`a7e1dfd5-27d4-4661-92ea-11cd009cb697`,e._sentryDebugIdIdentifier=`sentry-dbid-a7e1dfd5-27d4-4661-92ea-11cd009cb697`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{Ag as t,Dg as n,Fg as r,Ig as i,ch as a,dn as o,k as s,mr as c,sh as l,wg as u}from"./entry.client-dr7r6s9a.js";import{n as d}from"./guideRouterEnvironmentHooks-gdtmgzra.js";import{t as f}from"./useGuideStrings-d2n0srzf.js";import{t as p}from"./GuidePageLayout-imh16gdu.js";import{t as m}from"./GuideL2Header-b90pi17a.js";import{n as h,r as g,t as _}from"./GuideFriendsPicker-e05agpt5.js";var v=r(),y=e(i(),1),b=t(),x=e=>{let t=(0,v.c)(20),{isActiveParty:n,goBack:r,onSelect:i,disableButton:a}=e,{locAddPeople:o}=s(),{locSendInvitesCount:c}=f(),l,u;if(t[0]!==n||t[1]!==r?(l=()=>{n||r()},u=[n,r],t[0]=n,t[1]=r,t[2]=l,t[3]=u):(l=t[2],u=t[3]),(0,y.useEffect)(l,u),!n)return null;let d;t[4]===o?d=t[5]:(d=o(),t[4]=o,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]!==a?(S=(0,b.jsx)(_,{getSelectButtonLabel:c,disableButton:a}),t[8]=c,t[9]=a,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-related-content-in-a-section-tight`,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]!==i||t[18]!==T?(E=(0,b.jsx)(g,{onSelect:i,children:T}),t[17]=i,t[18]=T,t[19]=E):E=t[19],E},S=o(x,()=>{let{activeParty:e}=l(),{data:t}=n(e.queries.currentPartySession.getActiveUserQuery().getOptions()),{mutate:r}=u(e.mutations.inviteUsers.getActiveUserMutation().getOptions()),i=d(),{trackUserAction:o}=a(),[s,c]=(0,y.useState)(!1),f=e=>{o(`PartyInteraction`,{type:`InviteUsers`,wasSuccessful:e},`Press`)};return{isActiveParty:!!t,goBack:i,onSelect:e=>{c(!0),r(e.map(e=>e.xuid),{onSuccess:()=>f(!0),onError:()=>f(!1),onSettled:i})},disableButton:s}}),C=c(()=>(0,b.jsx)(S.useComponent(),{}),`InviteToPartyPage`);export{C as InviteToPartyPage,C as default,S as InviteToPartyPageConnection,x as PureInviteToPartyPage};