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]=`38320319-0b81-411a-9740-1c99b0d9df80`,e._sentryDebugIdIdentifier=`sentry-dbid-38320319-0b81-411a-9740-1c99b0d9df80`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{$ as t,D as n,tt as r}from"./xds-react-components-lks62tbl.js";import{Ag as i,Dg as a,Fg as o,N as s,ch as c,dn as l,k as u,lh as d,nh as f,or as p,sh as m,wg as h,wh as g}from"./entry.client-dr7r6s9a.js";import{Ct as _,St as v}from"./xds-icons-d7khcnpi.js";var y=o(),b=e(p(),1),x=i(),S=l(e=>{let i=(0,y.c)(31),{background:a,className:o,handlePress:c,isCloaked:l,isFullySignedIn:f,isDataReady:p}=e,{t:m}=d(`UserPresenceDropdown`),{locOnline:h}=u();if(!p||!f)return null;let g=l?`offline`:`online`,S;i[0]===c?S=i[1]:(S=e=>{c(e!==`online`)},i[0]=c,i[1]=S);let C=S,w;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,x.jsx)(v,{className:`text-feedback-status-standard-content-icon-okay-or-online`}),i[2]=w):w=i[2];let T=w,E;i[3]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,x.jsx)(s,{className:`text-feedback-status-standard-content-icon-pending-or-offline`}),i[3]=E):E=i[3];let D=E,O;i[4]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,x.jsx)(_,{className:`text-item-invisible-container-default-content-primary-rest type-subtitle2`}),i[4]=O):O=i[4];let k=O,A;i[5]===Symbol.for(`react.memo_cache_sentinel`)?(A={autoFocus:!0,trapFocus:!0,enableGamepad:!0,initialFocusLocationStrategy:`first-child`},i[5]=A):A=i[5];let j;i[6]===o?j=i[7]:(j=(0,b.default)(`items-center gap-internal-icon-and-text-gap-loose self-stretch bg-container-backgrounds-elevation-background-level-4 !px-component-item-list-container-padding-right-and-left !py-component-item-list-container-padding-top-and-bottom`,o),i[6]=o,i[7]=j);let M=l?D:T,N;i[8]===m?N=i[9]:(N=m(`Status`,{shortKey:`presence_status`}),i[8]=m,i[9]=N);let P;i[10]===N?P=i[11]:(P=(0,x.jsx)(n,{children:N}),i[10]=N,i[11]=P);let F=!l,I;i[12]===h?I=i[13]:(I=h(!0),i[12]=h,i[13]=I);let L;i[14]!==F||i[15]!==I?(L=(0,x.jsx)(t,{id:`online`,isSelected:F,label:I,leadingIcon:T,trailingIcon:k}),i[14]=F,i[15]=I,i[16]=L):L=i[16];let R;i[17]===h?R=i[18]:(R=h(!1),i[17]=h,i[18]=R);let z;i[19]!==l||i[20]!==R?(z=(0,x.jsx)(t,{id:`offline`,isSelected:l,label:R,leadingIcon:D,trailingIcon:k}),i[19]=l,i[20]=R,i[21]=z):z=i[21];let B;return i[22]!==g||i[23]!==j||i[24]!==C||i[25]!==M||i[26]!==a||i[27]!==P||i[28]!==L||i[29]!==z?(B=(0,x.jsxs)(r,{focusBehavior:A,selectedItem:g,className:j,onSelectionChange:C,show:`both`,selectedItemIcon:M,background:a,children:[P,L,z]}),i[22]=g,i[23]=j,i[24]=C,i[25]=M,i[26]=a,i[27]=P,i[28]=L,i[29]=z,i[30]=B):B=i[30],B},e=>{let{services:t}=m(),{data:n,isPending:r,isError:i}=a(t.cloaking.queries.isUserPresenceCloaked.getOptions()),{isFullySignedIn:o,isPending:s,isError:l}=f(),u=!r&&!s&&!i&&!l,{mutate:d}=h(t.cloaking.mutations.cloakUserPresence.getOptions()),{mutate:p}=h(t.cloaking.mutations.uncloakUserPresence.getOptions()),{trackUserAction:_}=c(),v=e=>{let t=e?`Offline`:`Online`;(e?d:p)(void 0,{onSuccess:()=>{_(`AppearOfflineToggle`,{appear:t,wasSuccessful:!0},g.Change)},onError:()=>{_(`AppearOfflineToggle`,{appear:t,wasSuccessful:!1},g.Change)}})};return{...e,handlePress:v,isCloaked:n??!1,isFullySignedIn:o,isDataReady:u}});export{S as t};